You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This feels silly, especially when it's marked as a two pointers problem. I feel like this will confuse beginners and lead people astray. Pretty much every two pointers problem follows the same pattern of some sort of while l < r. There's no reason to break this with a worse solution.
The text was updated successfully, but these errors were encountered:
samlevine03
changed the title
validPalindrome solution is unnecessarily O(n) memory
validPalindrome solution is unnecessarily O(n) memory and doesn't use 2 pointers
Oct 21, 2024
Current solution on neetcode.io:
This feels silly, especially when it's marked as a two pointers problem. I feel like this will confuse beginners and lead people astray. Pretty much every two pointers problem follows the same pattern of some sort of
while l < r
. There's no reason to break this with a worse solution.The text was updated successfully, but these errors were encountered: