Monthly Essay: Cracking the Coding Interview vs Elements of Programming Interviews

Photo by Lewis Kang'ethe Ngugi on Unsplash

The interview process and more

  • Analytical and coding skills.
  • Technical knowledge and CS fundamentals.
  • Experience, and communication skills.

Main things to remember

  • Take the big project classes.
  • Get an internship.
  • Start something, build a project.
  • Shift work responsibilities more towards coding.
  • Use your nights and weekends.
  • A résumé needs to address HR staff
  • The points that differentiate you from everyone else, the most important points, should go first.
  • Had friends review your resume.
  • Practice with Mock interviews.

Complexity — Big O

  • Space complexity, how is memory used on each call?
  • Drop the constants, if we have a for loop going over a data set and performing an operation it would take O(N). Also if we have two non-nested for loops going over the same data set and performing an operation we would describe it as O(2N), and dropping constants O(N).
  • Drop the non-dominant terms, for example, O(N + log N) becomes O(N). This is because of the rate at which the operations grow, O(N) grows way faster than O(log N).
  • Multipart algorithms: If your algorithm performs a task, finishes, and then does another, you add the runtimes (like non-nested for loops). If your algorithm performs a task for each time you do something else, then you multiply the runtimes (like 2 nested for loops).
  • Amortized time, allows us to describe that although a worst-case happens once in a while, once it happens it will not happen again for so long that the cost is amortized.

Data structures, Algorithms, and Solving Principles

  1. Listen: Pay close attention to details while the problem is being exposed and save mental notes on the key consideration. Those key aspects might be necessary to take into account to construct an optimal algorithm.
  2. Example: As mentioned before examples are of great help, nonetheless, you must debug your example to consider special cases and different sizes of input.
  3. Brute force: Work to get a brute-force solution, do not worry about efficiency yet. Do not code yet, but find it as soon as possible so you can also start thinking about improvements.
  4. Optimize: Go through your brute-force solution using the BUD optimization (bottlenecks, unnecessary work, duplicate work). That is, look for unused info. Solve manually by using an example and then reverse engineer your thought process. Solve it incorrectly and think about why the algorithm fails. Make time vs space tradeoffs.
  5. Walkthrough: If you get an optimal solution go through your approach in detail, making sure that you have understood every part before start coding.
  6. Implement: Modularize your solution and write clean code.
  7. Test: Walk through your code as you would in a code review, check unusual code, hot spots, create small test cases, review special cases, and edge cases.

More important topics

  • Object-oriented design, design patterns. Other programming paradigms.
  • System design, and scalability (find good design problems in the EPI book).
  • Testing, types of testing, styles of programming (TDD, BDD).
  • Language questions (if you know you will be interviewed for a specific language). Here the Elements of Programming Interviews book can help a lot in an included section design for this (remember you can find a book for Java, C++, or Python).
  • Common tools: Databases, version control systems, networking, etc.

Conclusion

  • If you need a big refresher on the topics before beginning working on problems go for Cracking the Coding Interview, if you cannot remember enough or if you know just a little of complexity and big O, go again for the same book.
  • If you want to go more specific over a language (Java, C++, or Python) and you already have experience with the concepts but need to work on problems go for the EPI.
Photo by Pete Pedroza on Unsplash

--

--

--

Engineer looking to help and contribute. Learning about Software development and Computer Science.

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Add Tests to Expand “Good Afternoo n”

Learn Dynamic Programming: A Beginner’s Guide to the Coin Change Problem

CopyrightChapter 21: Scaling Agile

https://cdn-images-1.medium.com/proxy/1*8Zdja-TZCxq_Y9rfhHGlOQ.jpeg

I Had a Dream about iPad

Finding the Light — My SE Bootcamp Journey

You Scratch Mine, I’ll Scratch Yours

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Eduardo Ahumada

Eduardo Ahumada

Engineer looking to help and contribute. Learning about Software development and Computer Science.

More from Medium

I want to be a programmer. Where to begin?

How to Choose a Programming Language?

As If Sand Were The Stone…

Guide To Dynamic Programming 👨‍💻