arifulmrislam / interview-preparation-faang

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Preparation Phase

It took me a bit more than 2 months to prepare for the interviews. I solved around 200-220 problems from leetcode within this time frame. But, I repeated the blind75 list 4 times. Something that I would like to mention is that, no one really has to do it within 2 months if possible. If I could, I would at least take 4 months to prepare. Take things in your own pace. Don't be upset if it takes you more than you expected. It's okay. Also, if you find it difficult to solve problems initially, just know that good things take time.

How I studied

Being a working professional while being not so good at data structures and algorithms was a barrier in the initial days. I knew that I can't really solve problems blindly unless I studied them. So, in the earlier days, I learned all the most frequent data structures and algorithms. My study flow was: stack/queue -> linked list -> tree -> graph -> heap -> dynamic programming -> (after many many practices on previous ones) -> greedy -> randomized algorithms.

I used to start with a topic and solve problems. For easier topics, I took 2-3days. For the difficult ones(dynamic programming), I took more than 2 weeks. After a week or two, I used to come back to the previous topics and re-solve them.

To learn the data structures and, to be proficient enough to solve most medium problems within 20-25 minutes, took me around 1 and a half month. I started with the easy ones for each topic. Once I got comfortable with them, I moved on to the next level. My approach to solving a problem was- taking 20 minutes to think about a problem. If I couldn't come up with anything, I would take a look into the solution and learn. After a day or two, I would come back to the problems that I needed help with and would try to implement them on my own. Slowly, I adapted the approaches and didn't have to look at them anymore as frequently as I used to.

Within end of February, I solved all the blind75 problems 2 times. And 2 more times later on. I could solve them pretty fast by the end. In terms of unseen hard problems, sometimes, I could solve them within 30-50 minutes, sometimes I couldn't. So, I can't really give a proper estimation for this.

The few other things that I made sure to practice were:

  • always speaking out loud no matter what problem I solved. These days, it kinda became a habit.
  • Always made sure to write space and time complexity in the comments.
  • Once I was confident about problem solving, I put a lot of time on code readability and python-specific features which I will discuss in the later part.

Data Structures & Algorithms

As I am a working professional and I had only 2month-ish to prepare for everything, I couldn't follow any book or even any course. The resources I followed:

GeeksForGeeks

I studied sorting, greedy algorithms and randomized algorithms from this resource.

Leetcode Explore Tab

For everything else which includes - heap, dynamic programming, graph, tree, linked list, stack & queue, I found the leetcode explore to be extremely helpful. As it provides problems ritght after notes, this helped me clear up many things.

Elements of Programming Interviews A really good book. I loved reading it. But, I didn't read the whole book. Just a few bits here and there. I would suggest to go through this book cover to cover if anyone has time.

Cracking the coding interview Didn't read much from this one. But, some say it is really good.

Miscelleneous

Whenever I faced difficulty, I just googled. I don't really have most of the links, but still mentioning the few gems I found on leetcode:

Problem lists I tried to solve from

  • Google tagged questions sorted by frequency from leetcode.
  • Blind75
  • problems from leetcode explore cards
  • sean prasad list of leetcode problems(I couldn't solve many from this as I didn't have enough time)

Code Readability

Few things that I remember:

  • I read the google python style guide. Couldn't read the whole guide as I didn't have enough time. I just focused more on the sections that would come up in the interviwes
  • I made use of namedtuple, enum, dataclass
  • Whenever I used any datastructur, I explained the reason behind using it to the interviewer(or myself during practice)
  • If a code logic seemed a bit complex, I used a one-line comment to explain it
  • proper logical naming is really important. Even if I couldn't come up with a good name within a short time, I mentioned that to them.
  • Writing the test cases in commments

Python specific features

  • Learn the python data structures by heart. Be ready to explain them if needed. Even if they don't ask you, it's good to know and mention them. At one interview, I did so which made the interviewer impressed
  • few data-structures and libraries that might help you: heapq, namedtuple, dataclass, counter, deque, defaultdict
  • don't forget to brush up your python basics

System Design

I didn't really spend much time on this one. Maybe a video from gaurav sen playlist once or twice a week. During the final days, I studied the grokking course. If you have time, I would suggest always keeping yourself up-to-date with the company specific engineering blogs.

Few other resources that I didn't follow due to time shortage:

Design Patterns

I only had 3-4 days when I learned that I will have an OOD round. So, I just revised a few design patterns(singleton, factory, strategy, decorator etc) that I previously knew about from here and here. A few more:

Behavioral

I used to study these concepts whenever I had some free time or I felt really tired to solve problems. A few resources:

I revised and made a document of the details of the projects that I mentioned on the resume.

Miscelleneous Topics

I also revised OS, Database and Networking from undergrad days. Although these didn't come up that much in my case, sometimes, these do. I studied the topics from random sources I found through googling.

Random

** A few inspirational posts with tips:**

A few things that I think helped me:

  • I always liked reading about others' experiences and what they have to say
  • Always making sure I understand why someone failed in the interviews
  • I kept tracking my progress every single day. I kinda have a diary of two months now. I think this helped me a lot to clear my thoughts.

About