Advanced Data Structures

Sometimes, basic DS don’t serve the purpose to solve problems and you need to know advanced DS. Day to day problems like implementing a prefix based search for a phone contact list to finding the dictionary word from a jumbled sequence of characters need special kind of DS. There are many of them – TST, Trie, Suffix tree, Suffix array, Fibonacci heap, Segment tree, Gap buffer, Rope, Skip list, K Dimensional tree and so on. While it is good to know the implementation of these DS, I would suggest to also know when to use one.

How to prepare for top MNCs?

This post was residing in my draft for quite long. I finally got some time out of my busy schedule to refine it.
The first question quickly pops up on why am I writing this post at all. There are already tens of hundreds of similar compilations on web that talks about this.

Well, following reasons compelled me to do so:

  1. Being a GFG moderator, I’ve been getting many requests from readers through various social media (FB, LinkedIn, Quora, InstaGuide) and various mail clients asking for mentorship and guidance on how to prepare for top MNCs like Microsoft, Amazon, Google etc
  2. Having gone through similar journey and witnessing many of my friends succeeding, I feel knowledge should be shared. My experience might be useful for newer generations who happen to chase the same goal as once was mine

Please note that this article is purely a reflection of my learnings, what I followed through the years and my experience. This is NOT the only way to improvise on what is needed – your coding skills, strengthening DS & Algorithms and boosting problem solving skills. I repeat, this is NOT the only way. There are things I couldn’t follow because of time constraints or didn’t follow because I was just not aware. Please comment if I missed anything which is worth mentioning here.

Similar Reads

Language

Language has been a topic of debate between aspirants since years. It’s always good to master one language, knowing ins and out of it rather than hopping from one language to other. Why?  Because sometimes it might happen to you that when you get a problem, you start wondering what language you should choose and your focus is compromised. When you should really concentrate on problem solving, Implementation comes later. Then while you are coding, you plan to change the language in between. This won’t serve you good in interviews. If you’re able to solve a problem in language ‘X’, eventually you will also solve it in language ‘Y’. Learning a new language is just a matter of time. A language might not be as widely used after 5 years as it is being used now. Your ability to solve a problem will what matter in the long run....

Data Structures and Algorithms

Data Structures and Algorithms is very important and serves as the backbone of problem solving....

Advanced Data Structures

Sometimes, basic DS don’t serve the purpose to solve problems and you need to know advanced DS. Day to day problems like implementing a prefix based search for a phone contact list to finding the dictionary word from a jumbled sequence of characters need special kind of DS. There are many of them – TST, Trie, Suffix tree, Suffix array, Fibonacci heap, Segment tree, Gap buffer, Rope, Skip list, K Dimensional tree and so on. While it is good to know the implementation of these DS, I would suggest to also know when to use one....

Problem solving

So you got a gun, understand how to use it, probably have used it before. If you are going to fight a war, you won’t like to rely upon your amateur experience. You would prefer to practice hard to save your ass. Now try to think it in perspective of problem solving. You know what DS are. But you also need to know when to use one. Welcome to the world of problem solving. You are given a problem and you are asked to solve it. That problem can be anything starting from a simple puzzle to implementing a user scenario. You must have noticed degree of connection feature in LinkedIn. How will you implement it? Does your approach take care of scalability? Will your code crumble when user base increases ten folds? This is the most important skill top MNCs usually look for. How do you approach a problem? How do  you divide it into modules? How do you solve each of them and then combine them?...

Dynamic Programming

I separated out DP because it is one monster which is difficult to master upon. No matter how many problems did you solve in the past, a new DP problem can always surprise you. The more you will practice, higher the chances will be to find out patterns. Google is peculiar about DP. You should expect at least one DP problem per interview round  if you are preparing for Google. Practice DP section from:...

Competitive Programming

Competitive Programming plays a very important role in boosting problem solving skills and ability to perform under time pressure. Do participate in various online portals like TopCoder, CodeChef, SPOJ. Here is a post on Getting started in sport of programming....

Design and testing

So you are good in DS and Algos. You are probably good in problem solving as well and you come up with different approaches with varying time and space complexity. The problem which you solve in Competitive Programming is well defined and has to work under an environment which nobody will probably use. What if you are asked to implement a user scenario. The problem statement is usually vague and you need to discuss a lot to resolve ambiguities. This is where design comes into picture. How will you design a redo-undo feature? What data structures will you use to store history in a web browser? How will you implement auto-complete feature in address bar? Let’s say Amazon wants to build a feature that would resume a video stored in cloud from any device. What data structures will you use? How will you scale up things? Does your design take care of concurrency issues? What about the performance? What if you and your girlfriend share the same cloud account and are trying to play the same video from different devices?...

What else?

Have a sound understanding of Operating System. The dinosaur book by Galvin is a good read. Know how networking works and have insights on DBMS....

Resume building

First impression is the best. Resume is the first thing that HR will use to decide whether to call you for interview or not. And they have got hundreds of them. So they will usually scan it for 20 seconds to 2 minutes. It should be clean, concise and elegant. Each word mentioned should worth the space it eats. The rule of thumb is if you have less than one year of experience, the size of resume should not exceed a page (with few exceptions)....

How to apply for Microsoft?

I get many messages asking me for a favour to refer them. When I ask them how much comfortable they are with DS and Algos, they say good enough. Then I rephrase my question to how do they feel when they solve interview experiences at GeeksforGeeks. Either they haven’t heard of GeeksforGeeks or they never read. This is not a surprise. GeeksforGeeks is still growing. But when I ask them a problem on DS by tweaking already existing famous ones, all they say is they haven’t solved this problem before. Please do NOT do that. Dreaming is good, but it will come true only when you work towards making it a reality....

Do’s and Don’ts

Practice, practice and practice Make a habit of writing clean and readable code (avoid variables names like i, j) Make sure to handle all corner cases Use pen and paper to practice code. In interviews you have NO access to a compiler Don’t mug up the solutions. Try to solve on your own Think of different ways of solving a problem and thoughts on why one should be preferred over the other...

Resources

I have answered few questions related to interview preparation on Quora. You might find some content missing here in blog and it is intentional to avoid the duplication of efforts. Please read my technical answers here....