Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save mateusmarquezini/7f3d52e3971f62e3c3ea7ff9c57ec07e to your computer and use it in GitHub Desktop.
Save mateusmarquezini/7f3d52e3971f62e3c3ea7ff9c57ec07e to your computer and use it in GitHub Desktop.
HackerRank Left Rotation Problem Golang Solution
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