Professional Documents
Culture Documents
(A number after a topic is indicating tier N and above. If not, assume all tiers.)
Data structures
1. Linked List
• Doubly Linked List (3)
2. Map
• Regular Hash Map
• Tree Map (2)
3. Stack
• Regular Stack
• Mono-Stack and its techniques (2)
4. Queue
• Regular Queue
• Deque (3)
5. Binary Tree
• Regular Binary Tree
• Binary Search Tree (3)
• Balanced Binary Search Tree (Red-Black, AVL) (1)
6. Priority Queues (Max/Min Heap) (3)
7. Disjoint Set Union-Find (3)
8. Special Trees
• Fenwick Tree (1.5)
• Segment Tree (1.5)
• Trie (2.5)
Algorithms/Techniques
1. Greedy
• Quick Sort
• Merge Sort
• Bubble Sort
2. Bitwise operations (2)
3. Sliding Window (3)
4. Topological Sorting (2)
5. Graph algorithms
• Dijkstra (2)
• Kruskal/Prim MST (Rare. 2)
• Tarjan (1)
• Depth First Search (DFS - 3)
• Breadth First Search (BFS - 3)
6. Two Pointers (3.5)
7. Rolling-Hash Rabin-Karp (2)
8. Recursion/Backtracking
9. Binary Search
• Normal Binary Search
• Result Binary Search (3)
10. Dynamic Programming
1. Top Down (2)
2. Bottom Up (2)
Preparation Material:
• Leetcode
o Please buy Leetcode Premium.
• Youtube for system designs (senior interview)
o https://www.youtube.com/c/codeKarle
o Gaurav Sen
How I prepare myself from the interview
Background: I learn programming back in 2003 and has a background of competitive programming.
However, I stop practicing when I went to college. I joined Microsoft in 2014 and now have around 6.5
yoe. Currently I have a 5-month-old daughter and she’s my great source of motivation during this time.
Timeline
1. Recruiter reached out to me in mid-December. After being with Microsoft for bit long, I’ve
decided to give this a try
2. I’m fluent in c# but heard that Python is much easier and faster for interview, so I self-taught
myself Python to deal with the interview. As well as knowing another popular language will
give me much more options and opportunities anyway
3. With work going on, I spend around an 1-2 hour every day to work on 2-4 problems every
day. Starting with easy questions, and try out medium once I got ahold of things again
4. I took PTO at the end of Jan so I can focus 100% on practicing. That’s where I worked on
about 10-15 problems a day (mostly medium, 1-2 hard) for around 2 weeks. Then it’s a
share between Leetcode and System Design practicing
Result
Online assessment: Hacker rank (2 questions around leetcode medium) + never ending of behavioral
multiple choices
1. Given an array/list of words where a word can appear once or many times. Return the first
index of the word that appear once.
Follow up: imagine the input instead of a fixed/static array, is now a data stream. How
would you handle this? (think about it as query-based situation, where the stream can be
pause and your function is called)
Similar to this: https://leetcode.com/problems/all-oone-data-structure/
2. Write a function to reverse a string. Then for a sentence, revert each of the word in that
sentence
3. A specialized LinkedList is defined as a regular LinkedList with a list of random pointers to
other nodes. Given the root of a specialized LinkedList, clone that LinkedList.
Follow up: can you clone without extra memory?
Design an analytic service for Amazon retail website so that leadership team / sale team can figure out
what is the best seller products for a particular time range
UBER
Note: Uber recruiter is slow, like terribly slow. Please make sure to keep emailing him/her for status
Online assessment: 1 hour, contains 4 questions (2 easy, 2 medium). Usually, the last question will be in
the form of a query question, where input is a list of queries. You can submit as many times as you like
in that 1 hour, and don’t feel bad if you couldn’t get the maximum score. Personally, I didn’t achieve the
maximum score either, but was sent to onsite
Onsite interview: 5 rounds. 3 technical rounds (1 will be system design), 1 with hiring manager (usually
some Behavior and some Coding), 1 Behavior
Online assessment/Phone Interview: I got lucky. Couple of friends in Google wrote up something nice
for me so Google skipped my phone interview.
Online assessment/Phone Interview: It’s 1 hour. My experience is 1 leetcode easy and 1 leetcode
medium (https://leetcode.com/problems/single-number/ and https://leetcode.com/problems/word-
break/ )
1. Behavior, same old story. With extra time available, he gave me a simple problem to warm
up. Given tax bracket % and salary, return the total tax for that salary
2. Two questions, similar to https://leetcode.com/problems/simplify-path/ and
https://leetcode.com/problems/regular-expression-matching/
I was lucky enough to look into the second question 1-2 days before the onsite or else it
would take me longer to complete this round
3. Similar to this question on leetcode: https://leetcode.com/problems/longest-substring-with-
at-most-k-distinct-characters/ and https://leetcode.com/problems/subarray-sum-equals-k/
4. Longest increasing path in a BST.
Follow up: longest increasing path in n-ary tree
Design Facebook Messenger. The interviewer definitely is more interactive than other company, will ask
more questions as well.
Interview process overview
A technical interview section mainly focusses on the following checkpoints:
1. Communications
2. Problem Solving skill
For communications, the interviewer will judge you based on the following:
How long preparation takes heavily depends on how much time you can commit. For people who’s
working full time, they usually set a target goal of 6 months, with extra 1-2 hours every day after
working hour for practicing. Overall, building up regular routine of doing leetcode is particularly
important as it put your brain into the ready mode all the time, so you won’t be scared/surprised when
you see a tough question.
1. Spend first week or two working on easy questions. This step mostly is to help you warm up
your DSA. Working on easy question at first will also boost your ego a little bit, as you won’t
struggle much. Jumping straight to medium/hard questions will most likely make you feel
discouraged, as you will have an impression that you’re not good enough
2. After warming up and get a habit of using multiple data structure like hashmap, queue,
stack, hashset, it’s time to get to medium question to elevate your skills
• You can start working on topic by topic, for example BFS/DFS then BST, DP. I highly
recommend that you don’t stay away from any topic for longer than 6-8 weeks since
there’s a possibility that you might forget what you did
• Another option is to work on problems by company tags. Start