Hirdetés
- Samsung Galaxy S24 Ultra - ha működik, ne változtass!
- Pebble - az átgondolt okosóra
- Xiaomi Watch 5 - kínai időszámítás
- Google Pixel topik
- Milyen okostelefont vegyek?
- iPhone topik
- Bemutatkozott a Poco X7 és X7 Pro
- Telekom mobilszolgáltatások
- Okosóra és okoskiegészítő topik
- Huawei Watch GT 6 és GT 6 Pro duplateszt
Új hozzászólás Aktív témák
-
axioma
veterán
Egy "feladvany" az interjus topik kedveert bemasolt formaban:
Given a string
sconsisting only of letters'a'and'b'. In a single step you can remove one palindromic subsequence froms.
Return the minimum number of steps to make the given string empty.
A string is a subsequence of a given string, if it is generated by deleting some characters of a given string without changing its order.
A string is called palindrome if is one that reads the same backward as well as forward.Example 1:
Input: s = "ababa"
Output: 1
Explanation: String is already palindromeExample 2:
Input: s = "abb"
Output: 2
Explanation:"abb" -> "bb" -> "". Remove palindromic subsequence"a"then"bb".Example 3:
Input: s = "baabb"
Output: 2
Explanation:"baabb" -> "b" -> "". Remove palindromic subsequence"baab"then"b".Example 4:
Input: s = ""
Output: 0Constraints:
0 <= s.length <= 1000sonly consists of letters'a'and'b'
Új hozzászólás Aktív témák
Állásajánlatok
Cég: Laptopműhely Bt.
Város: Budapest

