Created
March 30, 2023 22:34
-
-
Save NicolaM94/6467adb5daf949750075fb6ae13dfea6 to your computer and use it in GitHub Desktop.
Comparison of two int arrays in Go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func Compare (arrayA, arrayB []int) bool { | |
for i := range arrayA { | |
if arrayA[i] != arrayB[i] { | |
return false | |
} | |
} | |
return true | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment