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

Commit0588c2e

Browse files
authored
Update 1929-concatenation-of-array.go
1 parent4c0e22e commit0588c2e

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

‎go/1929-concatenation-of-array.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
funcgetConcatenation(nums []int) []int {
22
n:=len(nums)
33
ans:=make([]int,2*n)//lets make an array of int type and 2*n size
4-
54
i:=0
65
fori<n {//implementing for loop for the given condition
76
ans[i]=nums[i]
87
ans[i+n]=nums[i]
98
i++
109
}
11-
1210
returnans
1311
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp