Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
bastiaanus
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
3 ms
·
1.
▲
by
bastiaanus
13y ago
I don't know if it is against the rules, my approach was a recursive function.
2.
▲
by
bastiaanus
13y ago
I am at the "write a function that reverses a string without creating a new string" question and this is the answer on the site: def reverse(str): left_ptr = 0 right_ptr = len(str) - 1 middle = len(str) / 2