Tip 1 : Just be confident during interview and if you are stuck in between any question, then ask for a hint from the interviewer. The practice is key for success, so practice hard for Data Structures and Algorithms coding problems on Coding ninjas as it is the best platform for coding. Also you may practice on Geeks For Geeks or any other interview portal.
Tip 2 : Try to do as much as Data structures related questions as practice made a man perfect.
Tip 3 : If you have already done similar types of questions then you will get a solution approach very fastly during the interview.
Tip 1 : Mention all internships which you have done, as it increases your chances of shortlisting your resume.
Tip 2 : Keep resume short and up to the point and try to keep it on a single page.
Tip 3 : Also just write that skills which you are pretty confident about.
This round consist of coding questions and they were of good level based on strings and dynamic programming.
This round was the online coding test conducted on the platform Amcat. The languages allowed were C, C++, Java and Python.
If the Input Expression is 3*5+2, then the maximum value of ‘21’ can be obtained by placing the parentheses as 3*(5+2). So you need to return 21.
The interview took place in the morning and the interviewer was very friendly.
Input: 'n' = 5, 'm' = 6
'edges' = [[1, 2, 6], [2, 3, 5], [3, 4, 4], [1, 4, 1], [1, 3, 2], [3, 5, 3]]
Output: 11
Explanation: The given graph is:
The minimum spanning tree of the graph is:
And its weight is 1 + 2 + 5 + 3 = 11.
The input for the tree depicted in the below image would be :
1
2 3
4 -1 5 6
-1 7 -1 -1 -1 -1
-1 -1
Level 1 :
The root node of the tree is 1
Level 2 :
Left child of 1 = 2
Right child of 1 = 3
Level 3 :
Left child of 2 = 4
Right child of 2 = null (-1)
Left child of 3 = 5
Right child of 3 = 6
Level 4 :
Left child of 4 = null (-1)
Right child of 4 = 7
Left child of 5 = null (-1)
Right child of 5 = null (-1)
Left child of 6 = null (-1)
Right child of 6 = null (-1)
Level 5 :
Left child of 7 = null (-1)
Right child of 7 = null (-1)
The first not-null node (of the previous level) is treated as the parent of the first two nodes of the current level. The second not-null node (of the previous level) is treated as the parent node for the next two nodes of the current level and so on.
The input ends when all nodes at the last level are null (-1).
The above format was just to provide clarity on how the input is formed for a given tree.
In the input, each value of the sequence will be present on a separate line.
The left view of the above binary tree is {5, 7, 14, 25}.
Here's your problem of the day
Solving this problem will increase your chance to get selected in this company
What is 3 + 2 * 4 based on operator precedence?