@@ -0,0 +1,1612 @@
+%22%22%22Leetcode 26. Remove Duplicates from Sorted Array%0AEasy%0A%0AURL: https://leetcode.com/problems/remove-duplicates-from-sorted-array/%0A%0AGiven a sorted array nums, remove the duplicates in-place such that each element%0Aappear only once and return the new length.%0A%0ADo not allocate extra space for another array, you must do this by modifying the%0Ainput array in-place with O(1) extra memory.%0A%0AExample 1:%0AGiven nums = %5B1,1,2%5D,%0AYour function should return length = 2, with the first two elements of nums %0Abeing 1 and 2 respectively.%0AIt doesn't matter what you leave beyond the returned length.%0A%0AExample 2:%0AGiven nums = %5B0,0,1,1,1,2,2,3,3,4%5D,%0AYour function should return length = 5, with the first five elements of nums%0Abeing modified to 0, 1, 2, 3, and 4 respectively.%0AIt doesn't matter what values are set beyond the returned length.%0A%0AClarification:%0AConfused why the returned value is an integer but your answer is an array?%0ANote that the input array is passed in by reference, which means modification%0Ato the input array will be known to the caller as well.%0A%0AInternally you can think of this:%0A%0A// nums is passed in by reference. (i.e., without making a copy)%0Aint len = removeDuplicates(nums);%0A%0A// any modification to nums in your function would be known by the caller.%0A// using the length returned by your function, it prints the first len elements.%0Afor (int i = 0; i %3C len; i++) %7B%0A    print(nums%5Bi%5D);%0A%7D%0A%22%22%22%0A%0Aclass Solution(object):%0A    def removeDuplicates(self, nums):%0A        %22%22%22%0A        :type nums: List%5Bint%5D%0A        :rtype: int%0A        %22%22%22%0A        pass%0A%0A%0Adef main():%0A    pass%0A%0A%0Aif __name__ == '__main__':%0A    main()%0A

Add lc026_remove_duplicates_from_sorted_array.py