Skip to content
This repository has been archived by the owner on May 29, 2024. It is now read-only.

Commit

Permalink
Update reverse-array.go
Browse files Browse the repository at this point in the history
  • Loading branch information
leonardogonfiantini authored May 27, 2023
1 parent aa27a50 commit 449bd57
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions algorithms/Go/arrays/reverse-array.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@ package arrays

import ("fmt")

func TestReverseArray() {
// create an array of integers
arr := []int{1, 2, 3, 4, 5}
func ReverseArray(arr int[]) {
// get the length of the array
n := len(arr)
// iterate over half of the array and swap corresponding elements
Expand Down

0 comments on commit 449bd57

Please sign in to comment.