class Solution{ public: int removeDuplicates(vector & nums){ if(nums.empty()) return 0; int i =1; for(int j =1;j marks the position where the next unique element should be stored j-> scans the array to find new elements */