Problem of the day
Tip 1 : First Go through all the concepts of Data Structures and algorithms, I have taken Coding ninjas course c++ interview preparation.
Tip 2 : Try to solve all the problems by yourself then it will be meant for you, if you can't solve them after 30-45 minutes of time then see the solution of it, and for this, I used to consult TA and mentors on coding ninjas course.
Tip 3 : Have confidence in yourself, if you can't solve it initially, gradually you will be able to solve the problems. Hard work pays off.
Tip 4 : Note down the main information's about your project like what you have done in the project and what difficulties you have faced, it will be a great way to tackle questions about the project in the interview.
Tip 1 : Keep it simple and mention what you actually know and achieved.
Tip 2 : Mention your institute email-id if you have, it adds weight to the resume
Tip 3 : Use the "Built/created/made X using Y to achieve Z" format when writing about projects or work done.
It was 24 hours window for the online round from 8 Oct 10:30 am to 9 Oct 10:30 am. There were 7 MCQ problems related to c++, java, DBMS, and operating systems. And 2 coding problems with one easy and one moderate level difficulty for question, we were supposed to write the whole program but for other question, the function was to be written only. I was able to solve the first problem fully and the second 50%, you are required to pass test cases.
First Sort the price array. For finding the minimum amount start purchasing candies from starting and reduce k free candies from last with every single purchase. For finding the maximum amount start purchasing candies from the end and reduce k free candies from starting in every single purchase.
The interviewer asked me questions about projects, general discussion, and 3 coding questions based on linked list, arrays, and binary tree.
I gave optimum approach for every question.
Step 1 : Take two pointers
Step 2 : Initialize both pointers to the head node and iterate one pointer by two and one by just one step
Step 3 : The pointer which is iterating by one step will reach the mid when other will reach the end.
Step 4 : Delete the mid pointer(which reached the mid).
Step 1 : To compute the rank of the element first make a copy of given arr then sort that copied array in ascending order.
Step 2 : Then traverse in the copied array and put their rank in HashMap by taking a rank variable.
Step 3 : If the element is already present in HashMap then don’t update rank otherwise update rank of the element in HashMap and increment rank variable as well.
We can keep track of the level of a node by passing a parameter to all recursive calls. The idea is to keep track of the maximum level also. Whenever we see a node whose level is more than the maximum level so far. We print the node because this is the first node in its level (Note that we traverse the left subtree before the right subtree).