Check whether a string is a palindrome while ignoring spaces, punctuation and case, using two pointers in O(n) time and O(1) space.
Interview Insights and Technical Explorations
Check whether a string is a palindrome while ignoring spaces, punctuation and case, using two pointers in O(n) time and O(1) space.
Find the first character that appears only once in a string, in two passes with a count array or LinkedHashMap, with complexity and edge cases.
Check whether two strings are anagrams with a 26-count array in O(n), the sorting approach, a HashMap for Unicode, and how to ignore spaces and case.
Reverse a string in Java without StringBuilder.reverse(): the two-pointer swap, building a new string, recursion, and the Unicode edge case interviewers like.