Elements of Programming Interviews in Python: The Insiders' Guide

by: Adnan Aziz (0)

This is the Python version of our book. See the website for links to the C++ and Java version.Have you ever...

  • Wanted to work at an exciting futuristic company?
  • Struggled with an interview problem thatcould have been solved in 15 minutes?
  • Wished you could study real-world computing problems?

    If so, you need to read Elements of Programming Interviews (EPI).

    EPI is your comprehensive guide to interviewing for software development roles.

    The core of EPI is a collection of over 250 problems with detailed solutions. The problems are representative of interview questions asked at leading software companies. The problems are illustrated with 200 figures, 300 tested programs, and 150 additional variants.

    The book begins with a summary of the nontechnical aspects of interviewing, such as strategies for a great interview, common mistakes, perspectives from the other side of the table, tips on negotiating the best offer, and a guide to the best ways to use EPI. We also provide a summary of data structures, algorithms, and problem solving patterns.

    Coding problems are presented through a series of chapters on basic and advanced data structures, searching, sorting, algorithm design principles, and concurrency. Each chapter stars with a brief introduction, a case study, top tips, and a review of the most important library methods. This is followed by a broad and thought-provoking set of problems.

    A practical, fun approach to computer science fundamentals, as seen through the lens of common programming interview questions.
    Jeff Atwood/Co-founder, Stack Overflow and Discourse

The Reviews

The Good stuff:1. Book has a very good set of problems.2. Covers a lot of ground.3. Problems in here are hard and one wouldn't find them elsewhere.The bad stuff:1. Really poor explanations. The authors assume that you know the algorithms and for a lot of complex problems there is a one-two line explanation. If someone knew these he or she won't be looking for a book.2. While reading through I found myself increasingly looking on the web for solutions/explanations for the questions. Making the point moot for buying this book in the first place. Very frustrating!I get it that the authors are accomplished and brilliant. But, explaining is something that they haven't been able to provide in the book. Having said that it has some very good questions sprinkled.My advice stick to Leetcode or Hackerrank.

There are a lot of positives in this book. The strategies, interview prep, and types of problems are all great. Each chapter starts with some good details about how to attack the specific problems you'll see. Having said that I can't recommend this book.The authors mention that the code solutions are "Pythonic". However, this is not the case. In fact a lot of the code in this book seems to be written by someone who doesn't seem to grasp pedagogy. See the solution for string to int:def string_to_int(s): return functools.reduce(lamba running_sum, c: running_sum * 10 + string.digits.index(c), s[s[0]] == '-', 0) * (-1 if s[0] == '-' else 1)Are you kidding me? How is this solution even remotely pedagogical, or even an acceptable solution in a coding interview?Instead of buying this book, I would just grind Leetcode. There are plenty of lists available for free where you can work on problems seen in interviews. The discussion shows multiple solutions from people so that you can find a solution that makes sense to you in case you don't solve the problem.All in all, this book has really good explanations and information, but does not provide code in an acceptable pedagogical manner.

This is by far the best resource out there for someone who's interviewing in Python. There's a large variety of interesting questions, and the book includes challenging variants on many of those questions. These variants require even more creative algorithmic thinking.One of the biggest advantages of this book is that it's specifically geared towards Python. The Python solutions in this book are clean and well-thought out, and they habitualize good Python practices. It's much more effective than picking up an interview preparation book that's written in another programming language, and trying to port all the code over yourself.The authors also give some serious consideration to space complexity, and there are some really clever solutions in the book that aren't just time-efficient, but space-efficient as well.The second part of this book is the Honors Class section, which provides harder problems to solve once you're comfortable with the preceding material. It's roughly 60 pages of significantly harder questions/solutions that are meant to solidify your problem solving skills.I think the biggest strength of this book is the EPI Judge. It's a Git repository that you can clone, and gives you a playground to test out your own solutions to the problems listed in the book. It will then run your code against a correct solution across many test cases, and let you know if your code passes validation.I can't understate how useful that is. Especially for problems involving graphs and trees, setting up your own data structures and test cases can be an incredibly time-consuming process. If you go through this book and solve the problems with EPI Judge, you will be a much stronger interviewing candidate.UPDATE: Received 4 job offers from 6 on-sites, started at Google in October 2018.

I found this book helpful in brushing up on my knowledge of data structures and algorithms. It also contains useful interview tips for both interviewers and interviewees. It even has some short discussions on variety of other programming-related topics (parallel programming, design patterns, etc.).The book is organized by topic, with each topic having a set of problems and solutions with clear explanations by the authors.How does it compare to Leetcode? Well, for one, you can carry this book with you to the beach, which is harder to do with Leetcode. Another thing is that the authors have great career track records. I found their explanations to be of a higher quality than most of the explanations in the "Discuss" section on Leetcode. That said, there is more content on Leetcode (for free) than there is in this book. But quality > quantity, and I think this book was certainly worth the price for me due to its quality and accessibility.

I love Python. It's a beautiful, clear, simple language. It's perfect for whiteboarding. I do not love this book.The coding style in many cases is just... bad. The authors often use wonky Python tricks at the cost of readability and simplicity. For example, their definition of a BST search is a *one-line* nested ternary conditional (chapter 14, page 202). I sanity-checked with a friend who does interviews, and he said he would DOCK points for style if a candidate tried to pull something like that.In addition, the explanations in many sections are just confusingly worded. And sometimes, the presented solution is completely unintuitive or badly styled - like using global variables instead of passing parameters.Nothing is *wrong* per se, but if you're trying to learn best practices for whiteboarding clean, simple code, this book is useful only as a supplement or for very advanced programmers who are already comfortable with whiteboarding.

I have a new iPhone 13 which was mounted on a bike handlebar mount. I was riding a gravel trail when i hit a bump and the mount snapped off sending my phone tumbling down the trail behind me. All sorts of things were going through my mind as to the probable condition of the phone. In addition to this case I also had a Spigen screen protector on. I was pleasantly surprised to see that there wasn't a single scratch on the phone.

This case is well built and feels good in the hand. It will definitely do its job of protecting your phone if you drop it. Only wish it was magsafe. Spigen needs to definitely get in on more options for magsafe cases for iPhone 13s and not just the clear case option (not a fan of them).

I had the Spigen Tough Armor for my iPhone XR and I dropped that thing from waist to shoulder height many, many times on concrete, asphalt, you name it. Never scratched the lens, not a single crack in the screen (I also use/d Spigen's screen protector). I am extremely confident in this case and these products, despite their super-low prices, in protecting my expensive device. Fits perfectly and really doesn't add much bulk or weight. I just wish I didn't have to choose between the kickstand and MagSafe, but I suspect I'll use the former much more often than the latter.

This is probably the 4th or 5th Spigen Tough Armor I have purchased as I keep coming back to them for each upgrade. The edges make gripping the phone easy, which can slip depending on the roundness of the iPhone corners for some generations. The kickstand is great for when I want to watch something without holding the phone or setting it up for my kid. I've never broken a phone but I've dropped them less than a dozen times since my first phone, so I'm not the best for an opinion on durability. It definitely adds slight bulk but that's almost unavoidable for tough cases.If you're looking for drawbacks, the lock hole seems misaligned for my iPhone 12 slightly like they had adjusted it before launch. It also tends to gather dust where the case meets the phone, so I pop it out quite often to clean.Also if you have a game controller, like the Backbone One, you'll need to pop it out of the case to use it.

Lost my iphone off a rollercoaster, doing 50 mph and at least 50+ft off the ground. Busch Gardens Tampa found it and I was able to pick it up the next day. Lens protector shattered, screen protector cracked, case has a few dings, but the phone is without a scratch and in perfect working condition! Everybody bet my phone was toast but they were wrong! Awesome case! Been using Spigen for years and I always thought they were good, but now I swear by them!

Have used Spigen cases on my last three iphones with excellent results. This case is great looking and appears to protect the phone well. The fit is excellent and am very pleased with the smoothness of the power and volume buttons. The cons are the poor to no connection with wireless chargers, the flimsy kickstand, and no protection for the Apple logo. I have three different wireless chargers and none of them connect well. Unfortunately, I have to plug in to charge.Update: Upgraded rating to 5 stars. The problem with wireless connectivity was with my wireless hardware. All my original power supplies were not compatible with the iphone 13.

This is my second case by Spigen, first for the iPhone 7, now the 13. My 7 case was durable, so I felt confident this would be too. Well constructed with protective beveled edges and reinforced corners. The grip is good, not slippery, but can slip easily into a pocket. I’ve used the kickstand a few times - it seems a little thin, but holds the phone upright well. Buttons for volume and power are responsive. Appropriate cut-outs for bottom speakers and power cord. I can’t comment on wireless charging because I don’t use it.

It's a 2 peace case, the rubber then the plastic with the color. I personally don't feel like there isn't enough of a rim to protect the screen when and if dropped

This hamper acts as it should. So many things just don’t do their job, easy as their job may be, but this hamper does. Is this hamper next in line to be CEO? Not by a long shot, but will this hamper show up on time to work every day? Yes. Sick days? This hamper never takes them. This hamper doesn’t quit. It’s not looking for excuses to underperform. It’s here to work and work it does. This hamper will be there, at it’s desk, pushing papers until there are no more papers to push. This hamper didn’t lie on its resume. What you see is what you get. This hamper is loyal and knows it’s place. It doesn’t ask for special treatment because it’s too busy getting the job done. I can rely on this hamper and I’d bet that you can, too.

Best price and design I've found.... and I've looked hard.PROS:1. WIDE OPENING AT THE TOP for easy access compared with many similar products. Large folded towels and duvet covers go through without forcing or messing up the folding job. It's nice to have one handy in front of my dryer so clean things don't drool out onto the floor when I open the door after a cycle. With a basket with a smaller opening, it was more like the ping-pong-ball-into-the-fish-bowl futile exercise.2. LARGE AND STURDY for the price; having spent a ton of time comparing products and prices with each new purchase (including looking at Walmart, Target etc.), this has consistently been the best value through my several reorders. I can fit about a dozen bath towels, or a set of sheets, 2 pillow cases, duvet cover and a couple of towels in one basket.... pretty much whatever comes out of my large-capacity dryer will go into the basket.3. SIDE POCKET handy for anything you want to separate from the body. Not so much for heavy liquid detergent bottle as it could be hard on the mesh over time (see below under "cons") or cause the basket to tip over, but great for pulling socks out of the post-dryer gen pop, or sliding a piece of paper into the pocket for labeling such as "turnover", "beds", "donate" etc..4. SUPER EASY TO STORE these collapse or pop up in a fraction of a second, and I can slide at least six or eight of them into a two-inch space between the side of a dresser and a wall. When needed, they're ready for quick draw from their holster. I don't even slow down my walking pace.CONS: My only con is really just a note to the user. USE THE HANDLES TO LIFT EACH TIME. I find it's easy when I'm in a rush to grab the basket from wherever my hands land along the top wires of the frame even though the strong handles are right there and distribute the stress as designed. Over time, if you skip the handles when there is any weight to speak of in the basket, it will stress the mesh which may eventually tear; see second photo attached. This is my doing rather than a product defect, and I'm afraid I do it to every basket. Even with this, these baskets last beautifully.After trying a half a dozen hampers and baskets over recent years, I now have about ten of these collapsable baskets and use them every day for my furnished rental units as well as my household laundry.

This is the book I was looking for and I find it better than Cracking the Coding Interview for several reasons.1. It's written in Python 3.6, which is a more comfortable language than Java or C++ for beginners.2. It covers bitwise operations and data structures, showing how to implement them from scratch and common interview problems3. Good coverage of standard algorithm questions, though this is not an algorithms book per se.4. A lengthy section called "Honors Class" with reach problems that exceed the difficulty in most tech interviews but are nonetheless fascinating to solve and build up confidence.All in all a great book. I wish I'd found it sooner.

This is a nice large glass soap container for the guest bathroom! It leaves your hands smelling very good and your hands also feel soft! When my grandkids come from the bathroom, I ask if they washed their hands; then, I ask to smell their hands and if I can't smell this, then, I tell them to go back and try again! Now, they offer their hands up to me and say, "Smell, Nana, my hands are clean!"

Being a bit of a soap addict (weird, I know), I am always sniffing at soaps in the store. I ran across this at one of those large grocery stores that specializes in fresh produce and organics. I was sniffing the different scents from this company and absolutely loved it. I put it back due to the price, but in the process got some on my hand. I went and found a sink, washed it off... and spent the next two hours sniffing my hand because it smelled so wonderful. I was thrilled to find it on Amazon, granted only a couple of dollars cheaper than at the store. On a day when I felt like I needed a pick-me-up, I splurged.Ahhhh, it smells so wonderful. A day or two later my husband made a comment - he was trying to convince me he didn't like it, but then confessed he absolutely LOVED it. Yes, men will like this too! I think this bottle will last quite a while - I've had it over a week and barely a dent in it.My ONLY complaint is that whomever shipped it didn't do a very good job of it. The pump was open and some of the soap leaked out and on to the gardening books that came in the same order. Amazon, please pay attention to those details! Had more leaked out I would have filed a complaint.

Anyone who uses this in my kitchen runs right out to purchase it immediately. It smells so good! A little goes a long way and you can buy refills for your bottle, which is great IMO. I've used it for years and love having it in my kitchen. Doesn't dry out my hands, but there is a matching hand cream/lotion that I love just as much. The set is such a nice gift for a holiday hostess or for anyone through out the year.

I was my hands with this soap and I don’t want to rinse it off. Keeps hands soft all’ day.It is amazing and the scent will last a while. I also wash my face with it and it is leaves it soft all day long as well. My Italian heritage used to do that. The olive oil is a must. Try it, also a great gift idea..

I have used Cucina products for many years. They are addicting! My favorite fragrance has always been the coriander and olive tree . I have bought the dish soap, hand cream, hand soap, counter top spray. and kitchen mist - all wonderful. My new fragrance which I just purchased is the sea salt and Amalfi lemon hand soap. It ranks in the amazing fragrance department.

A friend gave me this as a gift one Christmas and I’ve been buying it ever since. The scent is just so lovely and the soap doesn’t dry out my hands. Love it.

This has become my favorite kitchen hand soap. The scent is pleasant, not too strong but lingers for a time. Does an excellent job of cleaning one's hands and it's biodegradable. It comes in a nice glass container and larger sized refills are available. Highly recommended.

I absolutely love this soap! With as much hand washing that I do, my 50 year old hands are drying out. This soap does not dry out my skin...I just LOVE it! My only beef is the cost... it's pretty steep...

Elements of Programming Interviews in Python: The Insiders' Guide
⭐ 4.4 💛 707
Buy the Book