Skip to content

Instantly share code, notes, and snippets.

Vladislav Isenbaev winger

View GitHub Profile
View "cargo export" output for cargo
root = "cargo"
[packages]
[packages.bitflags]
dependencies = []
path = "/Users/winger/.cargo/registry/src/github.com-1ecc6299db9ec823/bitflags-0.1.1"
version = "0.1.1"
[packages.cargo]
View isomorphic.py
s = input()
prevs = dict()
a = []
for i in range(len(s)):
if s[i] in prevs:
a.append(i - prevs[s[i]])
else:
a.append(i + 1)
prevs[s[i]] = i
You can’t perform that action at this time.