LeetCode-Swift icon indicating copy to clipboard operation
LeetCode-Swift copied to clipboard

RemoveDuplicatesFromSortedArray is not working as expected and output shows extra element in an array

Open ghost opened this issue 4 years ago • 0 comments

LeetCode-Swift/Array/RemoveDuplicatesFromSortedArray.swift The solution to the above problem doesn't seems to be correct.

e.g Input: [1,1,2,2,5,5,6,8,9,9,9] Program output in Leetcode console: [1,2,5,6,8,9] Program Output in Xcode Playground : [1, 2, 5, 6, 8, 9, 6, 8, 9, 9, 9] Expected Output is: [1,2,5,6,8,9]

ghost avatar Jan 13 '21 16:01 ghost