This repository has been archived by the owner on Oct 14, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 249
Remove Duplicates from Sorted Array [Java-Solution required] #471
Labels
Comments
Hello. I would like to work on this issue. Could you please assign this to me? |
Can a PR be accepted even if it isn't assigned to that particular person? |
i would like to solve this problem, please assign me |
I know how to remove duplicates from sorted array in Java, Please assign me this issue. |
Yes @NidhiMalpani ! You can raise a PR and it will still be counted as an open source contribution and Hacktoberfest entry. |
Hi guys ! Love to see such a great response ! Please raise PR for this issue as per CONTRIBUTING.md. Will review and merge your PRs if it is correctly raised and written. |
NidhiMalpani
added a commit
to NidhiMalpani/git-osp-for-beginners
that referenced
this issue
Oct 6, 2021
Created PR for Issue aditya109#471
aditya109
pushed a commit
that referenced
this issue
Oct 10, 2021
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Given an integer array
nums
sorted in non-decreasing order, remove the duplicates in-place such that each unique element appears only once. The relative order of the elements should be kept the same.Since it is impossible to change the length of the array in some languages, you must instead have the result be placed in the first part of the array
nums
. More formally, if there arek
elements after removing the duplicates, then the firstk
elements ofnums
should hold the final result. It does not matter what you leave beyond the firstk
elements.Return
k
after placing the final result in the firstk
slots ofnums
.Do not allocate extra space for another array. You must do this by modifying the input array in-place with O(1) extra memory.
Custom Judge:
The judge will test your solution with the following code:
If all assertions pass, then your solution will be accepted.
Example 1:
Example 2:
Constraints:
0 <= nums.length <= 3 * 104
-100 <= nums[i] <= 100
nums
is sorted in non-decreasing order.The text was updated successfully, but these errors were encountered: