How to start preparing for coding interview

4 minute read

When I started learning coding for a coding-interview for Facebook, Amazon or Google. I faced problems when I saw programmers were using terminologies like back tracking, dp, 2 pointer concept, etc. I was really upset and could not continue my journey to prepare coding and did give up my learning process. Therefore, I think if  you are also in the same boat then read this article to know how you can start coding and what you should do when you become a competitive programmer.

There is a subtle difference between software development engineer vs web development engineer. If you are already in the company 3-4 years of experience and coding in angular, react, node.js or any front-end technology then remember you are just a web development side.

Most of the Big 4 FAANGM (Facebook, Amazon, Apple, Netflix, Google, Microsoft) companies look for Software Development Engineers and there they will ask you first Data Structure and Algorithms related competitive questions. They may  not ask you about angular reactions. So therefore, if you want to go for any product-based company like ( paypal, uber, linkedin, and FAANGM ) etc. You have to be an expert on competitive programming questions.

You need to practice 2 things below in order to crack your next coding interview that is for sure.

  • Data Structure & Algorithms (DS & ALGO)
  • Competitive Programming ( CP )

You must start learning coding from Data Structure and Algorithms and then solve competitive problems.

Do Not start form Competitive Programming (CP)

If you go directly to Competitive Programming (CP) you may be able to solve a couple of problems. You may find it difficult to solve further problems and will be disheartened and come back. Finally, you will drop the plan to learn coding and back out. So Do not start from CP.

Example: like in 5th grade students get word problems. Which finally boils down to do either sum, subtract or multiply. If you give the same word problems to 3rd grade students they can’t solve it. However, they can solve addition, subtraction and multiplication If you give them directly.

Lets learn what is the basic difference between Data Structure & Algorithms VS Competitive problems.

What is Data Structure & Algorithms Programming?

Data Structure (DS) is something where you learn the basics of programming and structuring your data in the correct fashion. Data structures are like ( Array, String, Hash Table, Linked List, Tree, Graph etc. ). Normally, in IIT Gate interview or in computer science semester questions are pure data structure and algorithm (DS & ALGO) questions like reverse link list, write quick sort algo, tree navigations, find loop in Linked List etc. So in Big 4 or product development companies they do not ask direct DS & ALGO questions they rather create some fancy questions which combines many DS, Algorithms and best-practices that will enforce you to think deep and identify the solution.

So therefore, DS & ALGO is foundation and first thing to start for your coding interview practice.

What is Competitive Programming? 

Here you will get a paragraph of 10-15 lines of problems to read. You have to read that problem and think which DS and Algo you need to apply to solve the given problem.

Normally, In that problem statement, it asks you to solve the same DS Algo questions that you might have done earlier. However, you need to identify which one you need to apply to solve the given problem.

In Competitive Programming you may be applying below knowledges

  • DS & Algo Concepts
  • Mathematics Concepts
  • Bit Mask Concepts

This is the major difference between competitive programming and DS Algo. Therefore, you must always start your learning from Data Structure Programming then you should jump to Competitive Programming.

Competitive programming wants optimization from you.

My Experience with Facebook coding interview

In my Facebook coding interview, I have been asked to create an Iterator class which will have 2 methods one hasAny another method next.

Basically, if you read this question you just need to apply the find next in-order successor algorithm of Binary Tree data structure.

So data structure algorithm (DS ALGO) basic questions are wrapped in a fancy style and being asked to you in competitive programming. Therefore, you must be strong in DS & ALGO.

Summary

I used to ask my-self question why should I read a book on algorithms and data structure? So the answer is you must read them if you enjoy reading books. Or watch videos if you prefer video lectures to learn DS and ALGO. Therefore, the underline statement is you must learn and solve data structure & algorithm problems and then solve competitive programming problems to become a competitive programmer.

Reference


Thanks for reading my article till end. I hope you learned something special today. If you enjoyed this article then please share to your friends and if you have suggestions or thoughts to share with me then please write in the comment box.

💖 Say 👋 to me!
Rupesh Tiwari
Founder of Fullstack Master
Email: rupesh.tiwari.info@gmail.com
Website: RupeshTiwari.com