Remove Duplicates from Sorted Array
https://leetcode.com/problems/remove-duplicates-from-sorted-array/
func removeDuplicates(nums []int) int { i := 0 j := 1 for ; j < len(nums); j++ { if nums[j] == nums[j-1] { // duplicate continue } nums[i+1] = nums[j] i++ } return i+1 }