Hacker News new | past | comments | ask | show | jobs | submit login

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



I 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.


I am using this book for interview prep as well. Code is pythonic and a joy to read.


+1 for EPI. Using it now myself. It's great stuff.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: