Download 10-week-algorithm-excercise-master/Week_09/344/reverse_string.go from Dorothydu/gitrepo_20: direct link, hf CLI and curl.
- Browser
- Download file 169 Bytes
-
https://huggingface.co/datasets/Dorothydu/gitrepo_20/resolve/main/10-week-algorithm-excercise-master/Week_09/344/reverse_string.go
- Command line
-
hf download hf://datasets/Dorothydu/gitrepo_20/10-week-algorithm-excercise-master/Week_09/344/reverse_string.go
-
curl -L -o reverse_string.go https://huggingface.co/datasets/Dorothydu/gitrepo_20/resolve/main/10-week-algorithm-excercise-master/Week_09/344/reverse_string.go
169 Bytes
| package main | |
| func reverseString(s []byte) { | |
| for left, right := 0, len(s)-1; left < right; left, right = left+1, right-1 { | |
| s[left], s[right] = s[right], s[left] | |
| } | |
| } | |