Tip 1 : Learn the concepts, not the solutions.
Tip 2 : You should have deep knowledge about the projects mentioned in your resume.
Tip 1 : Resume should be only 1 page.
Tip 2 : Try to tell a story through your resume. For eg - always mention the impact or scale of your projects/internship.
Step 1 : Created 2 arrays for start time and end time and sorted them.
Step 2 : Applied merge 2 sorted arrays to get a sorted array technique to find the minimum rooms required.
Step 3 : If the start time is less than the end time, I incremented the number of rooms required else I decremented the
number of rooms required.I also kept track of maximum rooms required at any instance of ti...
Step 1 : Sort the array.
Step 2 : Xor all elements of the array.
Step 3 : Remove maximum element from xor by doing xor_array ^= current_max_element.
Step 4 : return the resultant array.
The first observation I had was what would I do if the first and last elements were not fixed. I was not able to solve this question completely, hence I used brute force approach(provided in above link) to pass some of the test cases.
Step 1 : Provided the linear search solution then I was asked what if the array is sorted?
Step 2 : Since the array is sorted used lower bound and upper bound to find the frequency of the given element
I told the interviewer I had already seen this question. Hence I quickly informed here about the concept of multi-source BFS to find the minimum time such that all oranges become rotten.
Step 1 : Assumed that there is no random pointer present, hence I was able to easily come with the solution to clone a normal linked list.
Step 2 : I was then asked can I do it in constant space, I was able to come up with the logic but wasn't able to code it.
Two Questions: -
1. How would you optimize a database?
2. Difference between Relational vs NoSQL.
Tip 1: Ask follow up questions because sometimes the interviewers give very little information to see how the candidate would approach the problem
Tip 2: GeeksforGeeks is a really good reference for DBMS.
Tip 3: In the above question interviewer expected indexing, normalisation as the main answer.
You have an e-commerce website. You have to find the closest warehouse to the customer's address. How would you index your database based on latitude and longitude to find the closest warehouse?
Tip 1: The interviewer doesn't expect bookish answer, they are more interested in your thinking process
Tip 2: The answer for this question is geo-spatial indexing(the name is not important, how you reached the solution is important.
You have a large database(100s of TB).Now you have to apply some formatting to it and copy it to another database.
How would you do it?
Tip 1: Always ask follow up questions for such abstract questions
Tip 2: Before jumping to the solution try to identify the problem you might have.
In this question first thing that comes to mind is just copy data from one DB to another.
But the problem is we cannot have such a huge physical memory.
My solution was reading the database in chunks, then formatting it and finally c...
Tip 1: Always follow STAR method while answering such questions.
Tip 2: Be as authentic as possible.
Tip 1: Try to show your leadership and management skills while answering such questions.
Tip 1: Do a thorough research about the company, read about recent press conferences, core values etc.
Tip 2: Do not give generic answers and never mention money.
Tip 3: Try to show how your personal goals align with the company's goals.
Design a card game. OOD was required in this question.
Tip 1: Try to create a structure(entities required etc.) before answering the question and think loudly
Tip 2: Read about SOLID principles
Tip 3: Try to think of scalability questions on your own while approaching the problem.