Skip to content

Conversation

mshradtya
Copy link

@mshradtya mshradtya commented Sep 30, 2025

the original "two sum" which is linked in the readme is not an ideal example for two pointers pattern, as here the input array is not sorted. hash maps will be a more appropriate pattern for this question. a better example would be "two sum - II", where the input array is sorted and two pointers approach can be directly applied.

even the original grokking the coding interview has sorted array for the problem.

the original "two sum" which is linked in the readme is not an ideal example for two sum, as here the input array is not sorted. hash maps will be a more appropriate pattern for this question. a better example would be "two sum - II", where the input array is sorted and two pointers approach can be directly applied.

even the original grokking the coding interview has sorted array for the problem.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant