Update reverse-array.go

pull/1161/head
Leonardo Gonfiantini 2023-05-27 12:22:17 +02:00 committed by GitHub
parent 449bd57f2b
commit a4edbaf506
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -6,7 +6,7 @@ package arrays
import ("fmt") import ("fmt")
func ReverseArray(arr int[]) { func ReverseArray(arr []int) {
// get the length of the array // get the length of the array
n := len(arr) n := len(arr)
// iterate over half of the array and swap corresponding elements // iterate over half of the array and swap corresponding elements