Tip 1: Start solving DSA questions early.
Tip 2: Keep your fundamentals clear.
Tip 3: Practice writing code on paper.
Tip 1: Keep your resume to one page and highlight only your core skills.
Tip 2: Include your past projects and maintain in-depth knowledge of them.
It was a Microsoft Teams interview, scheduled for around 11 a.m. The interviewer was punctual and very friendly.



Given a (n * n) 2-D grid of 0s, 1s and 2s. We need to sort the array from top-left to bottom-right so that all the 0s are aligned top and then right, followed by 1s and finally 2s towards bottom-right. Improve the complexity, if possible.
I initially sorted the row-wise arrays with a time complexity of O(n*n*logn). The interviewer asked if I could improve the complexity. I then used extra space to store the counts of 0s, 1s, and 2s and rebuilt the grid using those counts, which reduced the time complexity to O(n*n).



Consider the 2 * 2 grid
Let's call the four cells in the grid as A,B,C,D. In this grid, it is allowed to move from Cell A to Cell B, Cell B to Cell D, Cell C to Cell D and Cell D to Cell C. There are two paths that start from A and ends at D:
1) A->C->D
To follow this path we need to change the value of cell A to “D” and do not need to change the value of cell C. Therefore, the total change for this path is 1.
2) A->B->D
To follow this path we need not to change any of the cell values. Therefore the total changes for this path is 0.
As we can see the minimum changes required to reach the bottom-right cell is Zero therefore the answer is 0 in this case.
Classical graph BF/SDFS problem.
The interview was scheduled for around 2 p.m. It was another online call. The interviewer was punctual and very friendly.
Tip 1: Keep your fundamentals strong on operating system basics, especially threads and memory storage.
Tip 2: Have a strong command of Java or any other programming language of your choice. Be sure to understand its memory usage and multi-threading.
Tip 3: Be honest in the interview; if you don't know something, simply tell the interviewer.
The interview was scheduled for around 3 p.m., and the interviewer was friendly.



1. add(DATA) :
This function should take one argument of type and store it in its pool and returns the 'kth' largest number from the current pool of integers.
val - For this query, insert the integer into your current pool of integers and return the 'kth' largest integer from the existing pool of integers.
1. The maximum number of integers that will be given will always be under memory limits.
2. You will also be given an initial pool of integers whose size equals k.
3. The maximum number of queries will be less than 10^5.
4. The 'kth' largest element is not the 'kth' distinct element but the 'kth' largest element in the sorted order.
5. There will be at least one query of type 2.
Tried to do it with binary search first, but since the stream of infinite the last index was undetermined. Then used a different approach of selecting the last index in an incremental way by powers of 2- first last index=1, then last index=2, then last index=4, then last index=8, etc. This would give a complexity of O(logn * logn).
The interview was conducted by the manager, who was very knowledgeable and friendly. It was scheduled for 3 p.m. but started a bit late, around 4:30 p.m.
Design a low-level system for a search engine to search through a plethora of PDFs. Essentially, it was a search service to look for keywords within a collection of PDFs. The interviewer was interested in understanding the class structures, design patterns used, and some concepts related to indexing and databases. In the end, he switched to asking questions about my machine learning college project and how I could apply recommendations in search bars using ML.
Tip 1: Have knowledge of design patterns and object-oriented programming concepts
Tip 2: Keep the basics of DBMS clear like indexing, normalisation, joins, etc
Tip 3: Read about load balancer, caching, etc. and have in-depth knowledge about your projects mentioned in the resume.

Here's your problem of the day
Solving this problem will increase your chance to get selected in this company
How do you remove whitespace from the start of a string?