For a given string, it is necessary to determine the length of the largest palindrome that can be formed from its characters. A palindrome is a word that reads the same from the beginning and the end, for example "level" or "deified". Example: Input: aaabbbcccddd Output: 11 (palindrome dccbbaaabbccd)
Java
14621
265
Senior
131
What are transactions and what mechanisms ensure them in PostgreSQL? Tell about the isolation levels.
Senior
125
Condition Difficulty: MEDIUM Given an encoded string in the following format: k[encoded_text] Here, k is the number of repetitions of the encoded_text string. The string is guaranteed to have a correct format: no extra spaces, brackets are always correct, etc. Decode the string Example: Input: "3[a]2[bc]" Output: "aaabcbc" Input: "3[a2[c]]" Output: "accaccacc" Input: "2[abc]3[cd]ef" Output: "abcabccdcdcdef"
Senior
117