3 ms·
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 extr
by Puer 8y 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
- ultrasounder 8y agoI am using this book for interview prep as well. Code is pythonic and a joy to read.
- mixedmath 8y agoI hadn't heard of this before, so I went and checked this out this morning. I haven't read too much, but I've liked what I saw. And I notice that there are java and C++ variants for those interested in those languages. Thank you for your suggestion.
- johntam 8y ago+1 for EPI. Using it now myself. It's great stuff.