|
|
|
|
|
by Puer
2742 days ago
|
|
Elements of Programming Interviews in Python is excellent imo. The authors give a crash course in all of the data structures and all of the code is written extremely cleanly. Most of the problems give standard solutions and also idiomatic ones using iter/functools. I've been programming Python for years and felt like I gained a lot from it as a developer even though I bought it to interview prep. Quick example of the "look and say" problem: def look_and_say(n: int) -> str: s = '1'
for _ in range(n - 1):
s = ''.join(
str(len(list(group))) + key
for key, group in groupby(s))
return s
|
|