Skip to content

Commit

Permalink
Update 1929-concatenation-of-array.go
Browse files Browse the repository at this point in the history
  • Loading branch information
Sar-Go authored Jul 2, 2023
1 parent 4c0e22e commit 0588c2e
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions go/1929-concatenation-of-array.go
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
func getConcatenation(nums []int) []int {
n := len(nums)
ans := make([]int, 2*n) //lets make an array of int type and 2*n size

i := 0
for i < n { //implementing for loop for the given condition
ans[i] = nums[i]
ans[i+n] = nums[i]
i++
}

return ans
}

0 comments on commit 0588c2e

Please sign in to comment.