Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit52cdd5b

Browse files
refactor 1089
1 parent428a903 commit52cdd5b

File tree

1 file changed

+0
-24
lines changed

1 file changed

+0
-24
lines changed

‎src/main/java/com/fishercoder/solutions/_1089.java

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,5 @@
11
packagecom.fishercoder.solutions;
22

3-
/**
4-
* 1089. Duplicate Zeros
5-
*
6-
* Given a fixed length array arr of integers, duplicate each occurrence of zero, shifting the remaining elements to the right.
7-
*
8-
* Note that elements beyond the length of the original array are not written.
9-
*
10-
* Do the above modifications to the input array in place, do not return anything from your function.
11-
*
12-
* Example 1:
13-
* Input: [1,0,2,3,0,4,5,0]
14-
* Output: null
15-
* Explanation: After calling your function, the input array is modified to: [1,0,0,2,3,0,0,4]
16-
*
17-
* Example 2:
18-
* Input: [1,2,3]
19-
* Output: null
20-
* Explanation: After calling your function, the input array is modified to: [1,2,3]
21-
*
22-
* Note:
23-
*
24-
* 1 <= arr.length <= 10000
25-
* 0 <= arr[i] <= 9
26-
* */
273
publicclass_1089 {
284
publicstaticclassSolution1 {
295
publicvoidduplicateZeros(int[]arr) {

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp