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.
Move all zeros to the end of an array in place, keeping the order of the other elements, in one pass with O(1) extra space.