Remove Duplicates from Sorted Array
Given an integer array nums sorted in non-decreasing order, remove the duplicates in-place such that each unique element appears only once. Return the number of unique elements.
Remove Duplicates from Sorted Array

Given an integer array nums sorted in non-decreasing order, remove the duplicates in-place such that each unique element appears only once. Return the number of unique elements.

Example 1:
Input: [1,1,2]
Output: 2
Input
arr =[1,1,2]

Two pointer approach

slowfast101122
slow: 0
fast: 1
Unique: 1
Variables
No variables to display
DepthFunction Call
Stack empty
0/3