2. Pattern: Two Pointers
Last updated
Last updated
1. One pointer at each end
One pointer starts from beginning and other from the end and they proceed towards each other
2. Different Paces
Both pointers start from the beginning but one pointer moves at a faster pace than the other one.