Problem of the day
Tip 1: Having a grip over Data Structures and Algorithms is very important. Have your concepts crystal clear, and then pick one coding platform and try to practice around 7-10 questions every day with varying difficulty and different topics.
Tip 2: After writing code for a particular question, try to analyze its time and space complexity. Think about how you can optimize your code further. Also, refer to the editorials and compare your solution with it. Interviewers ask a lot about further code optimization. Hence, instead of trying to solve more and more problems, try to analyze a question completely and understand the concept behind it.
Tip 3: Along with coding, study about OOPS. Coding Ninja's Data Structures and Algorithms course helped a lot in preparing the OOPS concepts. Also, OS and DBMS must also be studied. You can refer to CodeStudio for these topics.
Tip 4: Keep participating in coding contests. It helps you increase your speed.
Tip 1 : Do not fake any skills, projects or achievements. The interviewer gets to know about it by asking questions to you.
Tip 2 : You do need to have a long list of projects. Any 1 good project with proper knowledge of it will also do good. Similarly, you do need to have many skills to be listed down. Few skills but with proper knowledge is great.
Tip 3 : Try to write achievements which proves your technical skills, communication skills, leadership quality or teamwork.
This round consists of 3 coding questions with a total time limit of 90 minutes. The first two questions were of easy level and the third question was of medium level. No two candidates had the same set of questions, the distribution of questions was random. The test was conducted on mettl platform with both audio and video on for monitoring on the candidate.
Since the array was unsorted, fist sort the array.
Return the middle element of the array if n is odd else return the average of middle two elements.
1. Add all the number of fruits.
2. Divided the total number of fruits with number of baskets, lets say this x.
3. Subtract x from all the initial number of fruits from each basket.
4. Add all the numbers and that is the final answer.
First I thought of the Naive approach which is to find all the possible combinations of values from n dice and keep on counting the results that sum to X. But since it consisted of some overlapping subproblems, I came to the conclusion that it can be solved by DP as well. Create a 2D array with the number of throws as row index and the sum as column index. Return the last element of 2D array.
This was my first interview and I was a bit nervous. The interview was conducted on Microsoft Team. He told me to share my screen and write the pseudo code on notepad. The interviewer was very friendly and also gave me hints for the question. However, he mostly focused on optimization of the code. At the end of the question, few questions related to Operating Systems were asked.
I applied Sliding Window technique to it.
The time complexity was O(N).
1. Store the frequency of characters in string p in a vector.
2. Run a sliding window as follows:
If the current count of the new character s[r] in the window is less than that in p, increment count.
If the length of the window equals p, compare count with p.length(). If they are same, add l to the result.
1. When does deadlock occur?(Learn)
2. What is the difference between process and threads?(
Tip 1 : Always give a structured answer. For example, first tell the definition and then quotes a few examples in support of it.
Tip 2 : Do refer to CodeStudio for OS. Try to read as many articles as you can.
The second round consisted questions related to concepts of object oriented programming and databases. At the end of the interview he asked me to explain any one good project. The interview lasted for 45 minutes. The interviewer was friendly and good.
1.What is the difference between static polymorphism and runtime polymorphism?(Learn)
2. What is a copy constructor? Tell any one use of it.(
Tip 1 : Always think properly before saying your answer. Try to communicate clearly.
Tip 2 : Coding Ninja's Data structures and algorithms in C++ course helped me a lot in clearing my OOPS concepts.
Tip 3 : Along with definitions, try to give examples also.
1. You should know properly about what is merge sort.
2. The pseudo code is as follows:
MergeSort(arr, left, right):
if left > right
mid = (left+right)/2
mergeSort(arr, left, mid)
mergeSort(arr, mid+1, right)
merge(arr, left, mid, right)
This was my last round and I was a bit tensed. It was an HR round. The interviewer was very professional. He discussed and asked questions about my various achievements, my interests apart from the technical field and also asked about my projects. I made sure to answer all the questions confidently and calmly.
1. Tell me about yourself.
2. Which is your favorite project? Elaborate that project.
3. Asked a question related to one of my achievements.
4. What role do you want in Microsoft?
5. Is there any technology that interests you and you would like to work upon?
Tip 1 : While answering to the question "tell me about yourself" , you can mention your technical skills and how you developed interest in coding. Apart from technical side, you can also tell your other areas of interest and hobbies.
Tip 2 : You should be clear about all the projects, the technologies used in it, why you used them specifically, the purpose of the project, etc.