diff --git a/Algorithms/Easy/26_RemoveDuplicatesFromSortedArray/Solution.py b/Algorithms/Easy/26_RemoveDuplicatesFromSortedArray/Solution.py new file mode 100644 index 0000000..9cddf10 --- /dev/null +++ b/Algorithms/Easy/26_RemoveDuplicatesFromSortedArray/Solution.py @@ -0,0 +1,15 @@ +class Solution: + def removeDuplicates(self, nums: List[int]) -> int: + # go through the array, + # if nth item and (n+1)th item match, pop nth item, but don't forward + # otherwise go forward + + i = 1 + while i