Tip 1 : Never never try to cheat in online interview the interviewer will definitely get to know.
Tip 2 : Psuedo code presentation matters a lot so name Your variable properly and with proper indentation.
Tip 3 : Keep on trying even if You feel that's not the right answer so at least put that idea forward.
Tip 4 : Do Leetcode medium questions as much as possible As they are mostly asked in Interviews.
Tip 1 : Avoid unnecessary details on Resume
Tip 2 : Make It look clean and also keep it of one page
Two Questions on Data Structures and Algorithms were asked.
Interview went well, asked to schedule second technical screen.
1. The array follows 0-based indexing, so you need to return 0-based indices.
2. If 'x' is not present in the array, return {-1 -1}.
3. If 'x' is only present once in the array, the first and last position of its occurrence will be the same.
Input: arr = [1, 2, 4, 4, 5], x = 4
Output: 2 3
Explanation: The given array’s 0-based indexing is as follows:
1 2 4 4 5
↓ ↓ ↓ ↓ ↓
0 1 2 3 4
So, the first occurrence of 4 is at index 2, and the last occurrence of 4 is at index 3.
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.
Two Questions on Data Structures and Algorithms were asked :
Apart from those questions, I was asked to explain couple of projects that I had done during my Masters.
And was asked to briefly explain OO Design of the Tic-Tac-Toe game.
For the given binary tree
The level order traversal will be {1,2,3,4,5,6,7}.
In the given linked list, there is a cycle starting at position 0, hence we return 0.
Here's your problem of the day
Solving this problem will increase your chance to get selected in this company
How do you select an element by class name in CSS?