We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
This one is really annoying, because the description of the problem must be wrong. It specifically says find the longest s possible, and for the example given, the longest possible palindrome from substrings in bac bac, would be 'abba' or 'cbbc' (but I guess abba since it says if multiple exist choose the first alphabetically). aba is NOT the longest.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Build a Palindrome
You are viewing a single comment's thread. Return to all comments →
This one is really annoying, because the description of the problem must be wrong. It specifically says find the longest s possible, and for the example given, the longest possible palindrome from substrings in bac bac, would be 'abba' or 'cbbc' (but I guess abba since it says if multiple exist choose the first alphabetically). aba is NOT the longest.