Tip 1 : Good grip on DSA
Tip 2 : Have good and unique projects
Tip 3 : Focus on CS fundamentals
Tip 1 : One page resume
Tip 2 : Highlights your skills. Don't lie on your resume.
The timings of the round was from 4 pm to 6 pm. The coding round was held online on HackerRank. Online proctoring was done on the platform.
All the elements in the array are distinct.
Input: arr = [3,4,5,1,2]
Output: 1
Explanation: The original array was [1,2,3,4,5] and it was rotated 3 times.
We can apply simple binary search on the array.
If we are given the above binary tree as input then moving from root node(5) to the farthest leaf node(50), the path formed will be [ 5->10->25->35->40->45->50 ]. The total number of nodes encountered is 7, therefore the maximum depth of the binary tree is 7.
The diameter of a binary tree is the length of the longest path between any two end nodes in a tree.
The number of edges between two nodes represents the length of the path between them.
Input: Consider the given binary tree:
Output: 6
Explanation:
Nodes in the diameter are highlighted. The length of the diameter, i.e., the path length, is 6.
The question can be solved by DFS, and it is a small modification to the program of the height of the tree. The idea is quite simple: the maximum value of Height(leftSubtree) + Height(rightSubtree) (at any node) is the diameter. Keep track of the maximum diameter during traversal and find the height of the tree.
The line 'd=max(d, ld+rd);' maintains the maximum diameter.
The interview was scheduled at 1 pm. It was a face-to-face interview, and we were told that the duration would be around 15 minutes, but it actually went on for almost 25 minutes. There were 4 interviewers on the panel. All of them were very friendly, but they also tested the confidence of the interviewee by asking and cross-questioning even on correct answers.
The interview was based on project discussion and CS fundamentals.
I was asked about my Java project.
Why did I use Java for the project?
What classes did I use in the projects?
Draw the ER diagram of the projects.
Tip 1 : Know your projects in detail.
Tip 2 : Know why you used particular technology over others.
Tip 3 : Practice ER diagrams of your projects.
Tip 1: Have clarity about the basics.
Tip 2: Know your database of your projects.
Tip 3: If you don't know an answer, better to communicate it to the interviewer than to beat around the bush.
Here's your problem of the day
Solving this problem will increase your chance to get selected in this company
Suppose list1 is [2, 133, 12, 12], what is max(list1) in Python?