Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
brich
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
3 ms
·
1.
▲
by
brich
16y ago
I think this would work (but I haven't tested it): Convert the string to an array of integers called FORWARD. Copy and flip the array into REVERSE. Subtract the values of REVERSE, offset by (0..length), pairwise from FORWARD. Then, just ke