You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
11 lines
153 B
11 lines
153 B
3 weeks ago
|
package adventoc2024
|
||
|
|
||
|
func reverse(s []int) {
|
||
|
start, end := 0, len(s)-1
|
||
|
for start < end {
|
||
|
s[start], s[end] = s[end], s[start]
|
||
|
start++
|
||
|
end--
|
||
|
}
|
||
|
}
|