Remove Duplicates from Sorted Array
You are given a sorted array nums. You need to remove the duplicates in-place such that each element appears only once and returns the new array. Do not allocate extra space for another array, you must do this by modifying the input array in-place with O(1) extra memory.
Ada AI
I want to discuss a solution
Help me solve this
Give more examples
What's wrong with my code?
How to use 'for loop' in javascript?
javascript (node 13.12.0)