DEV Community

Tyagiquamar
Tyagiquamar

Posted on

DSA Blind75, 2 Pointer Algo

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

  1. Used in array, strings etc.
  2. Used if input is sorted and we are comparing.
  3. 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)