# Two pointer

Denotes 2 pointers,  left from the start index, right from the end index.

Then, move those 2 indexes to find out the target value&#x20;

```java
        
        int left = 0, right = N-1;
        
        while(left < right)
        {
            ...
            if(...){
             left++;
            }
            else{
              right--;
            }
        }

```
