Java
The size of a Java array is fixed when you allocate it, and cannot be changed.
You’ve to provide a fixed size for that Array, You can neither EXPAND or SHRINK that array.
1
1 | class Solution { |
Submission Detail
- 161 / 161 test cases passed.
- Runtime: 6 ms
- Memory Usage: 39.8 MB
- Your runtime beats 97.51 % of java submissions.
2
1 | class Solution { |
Submission Detail
- 161 / 161 test cases passed.
- Runtime: 7 ms
- Memory Usage: 42 MB
- Your runtime beats 61.11 % of java submissions.
JavaScript
1 | /** |
Submission Detail
- 161 / 161 test cases passed.
- Runtime: 84 ms, faster than 42.35% of JavaScript online submissions for Remove Duplicates from Sorted Array.
- Memory Usage: 37.7 MB, less than 22.92% of JavaScript online submissions for Remove Duplicates from Sorted Array.