On the second day of blind 75. I learnt about 2 pointer technique.
it uses two pointer two reduce iterations to one.
When to apply two pointer/identify
- Used in array, strings etc.
- Used if input is sorted and we are comparing.
- Swapping, partition, removing duplicate or palindrome.
Explaination:-
https://medium.com/@timpark0807/leetcode-is-easy-two-pointers-90b9b0f2eb43
https://youtu.be/KLlXCFG5TnA
Problems done
1.Two sum.
2.Palindrome string.
2.removing duplicates from sorted array.
Top comments (0)