Tip 1 : Take your time before directly jumping onto the solution even if you have done the code already, it might be possible that interviewer would add any constraints of his own choice.
Tip 2 : Speak out loud, that's very important. If you are stuck onto something in between the interview, don't just sit idle or give up. Talk to your interviewer, let him/her know what's going in your mind, what approach are you trying to implement. The interviewer is your only friend in that room.
Tip 3 : Don't worry if you haven't been into Competitive Programming before, you can still crack a lot of companies with decent DSA skills, projects are add on.
Tip 4 : For preparation, go through coding ninja's course thoroughly. It's very likely to encounter same questions that are already in the course itself. Common problems like, stock span, balanced parentheses, edit distance-DP, etc.
Tip 5 : Don't panic on seeing a question that you haven't done before. Try to break the given problem into small problems first just like we do in DP, it will surely help you out in building logic if not solution.
Tip 1 : Take a nice template for resume, you can even refer sites like novoresume.com. It has got good templates, just pick any with no fancy fonts and colors. Keep it simple.
Tip 2 : Be very specific. Write out important stuff only if you applying for a tech job. No one's going to see your dance/acting skills while interviewing you.
Tip 3 : If you have mentioned your projects, make sure you add your source code's link/github repo link as hyperlink to it. That's very important, it helps interviewer know that you have done this project and you're not faking it.
There were around 50 mcq's on C/C++ concepts.
There was no negative marking though.
Online coding round.
We could only write pseudo code and couldn't test against test cases.
For...
Again i had already done this question in the course itself so it was a cake walk for me.
Solution:
Step 1: Create an empty queue which accepts BinaryTreeNode.
Step 2: Put root of the binary tree in the queue.
Step 3: Loop while queue is not empty
3a. store the current size of the queue which will help us know how many nodes are there which needs to be printed at one level.
3b...
It was onsite face to face technical round where i was asked 2 coding questions.
It lasted for 40-50 minutes.
I solved this question recursively.
Step 1: Find the given node in the tree.
Step 2: If node not found then simply return null, else check if K is greater than 0, if yes that means we haven't found the Kth ancestor, so we decrement the value of K.
Also we check if K value is 0 then we have found Kth ancestor, and we print it and return null and with base case if root == null, we return...
Only 7 students were shortlisted after the first face to face round out of 40 students.
The interviewer seemed cool and was trying to calm down me as i was getting nervous.
Again there were 2 coding questions.
The given linked list is 1 -> 2 ->...
This was the last technical round and there were only 5 students left at the end of day.
The interview started at around 6:30 in the evening.
Step 1: I made a helper function where i passed the root node and 0 which worked as the sum in it.
Step 2: Made a base case, if root is null, return.
Step 3: Went to the rightmost node of the tree as the rightmost node is the only node which will have highest value in whole BST.
Step 4: Added the root's data to the sum variable which was passed in the helper function.
Step 5: After ...
Solution 1: I tried solving this problem with brute force way first, starting with the first bolt and compare it with each nut until we find a match. In the worst case we require n comparisons. Doing this for all bolts gives O(n^2) complexity. hence i was asked to optimize it further,
Solution 2:I tried using the hashmap and came up to the solution as well.
Step 1: Traverse the nuts a...
Here's your problem of the day
Solving this problem will increase your chance to get selected in this company
What is the result of 4 % 2?
I have done Java and Python, however the 50 questions you are telling are from C and C++, do I need to go through it? I know C but I am not well equipped with C++. I will also be going through campus placements.