feat: initial commit
This commit is contained in:
7
util/reverse.go
Normal file
7
util/reverse.go
Normal file
@ -0,0 +1,7 @@
|
||||
package util
|
||||
|
||||
func Reverse[S ~[]E, E any](s S) {
|
||||
for i, j := 0, len(s)-1; i < j; i, j = i+1, j-1 {
|
||||
s[i], s[j] = s[j], s[i]
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user