Last active
March 22, 2023 14:59
-
-
Save mateusmarquezini/7f3d52e3971f62e3c3ea7ff9c57ec07e to your computer and use it in GitHub Desktop.
HackerRank Left Rotation Problem Golang Solution
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 rotLeft(a []int32, d int32) []int32 { | |
var i int32 | |
for i = 0; i < d; i++ { | |
a = append(a[1:], a[0]) | |
} | |
return a | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment