Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
thorwwaskeas
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
4 ms
·
1.
▲
by
thorwwaskeas
5y ago
Since they used the tests this is not something you can do if you don't have a rich battery of tests. Perhaps many problems are something like finite automata and the program discover the structure of the finite automata and also an a
2.
▲
by
thorwwaskeas
5y ago
from collections import defaultdict def backspace(s1,s2): h = defaultdict(lambda:0) for x in s1: h[x] = h[x] + 1 for x in s2: h[x] = h[x] - 1 j = 0 maxj = len(s2) - 1 for x in s1: