You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+40-1Lines changed: 40 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1334,7 +1334,7 @@ const isValid = s => {
1334
1334
1335
1335
**[⬆ Back to Top](#javascript-coding-challenges-for-beginners)**
1336
1336
1337
-
## Reverse Integer
1337
+
## 41. Reverse Integer
1338
1338
1339
1339
Given a signed 32-bit integer `x`, return `x` with its digits reversed. If reversing `x` causes the value to go outside the signed 32-bit integer range [-2<sup>31</sup>, 2<sup>31</sup> - 1], then return 0.
1340
1340
@@ -1367,3 +1367,42 @@ const reverse = x => {
1367
1367
---
1368
1368
1369
1369
**[⬆ Back to Top](#javascript-coding-challenges-for-beginners)**
1370
+
1371
+
## 42. Remove Duplicates from Sorted Array
1372
+
1373
+
Given a sorted array `nums`, write a function that removes the duplicates in-place such that each element appears only once and returns the new length. Do **not** allocate extra space for another array, you must do this by modifying the input array in-place with `O(1)` extra memory.
0 commit comments