Tip 1 : Practice questions everyday
Tip 2 : Learn OOPS concepts properly
Tip 3 : Also, try to learn the design principles
Tip 1 : Your resume should be clean and crisp. Mention your projects well
Tip 2 : Don't Lie on your resume
It was an online round



For the given binary tree [1, 2, 3, -1, -1, 4, 5, -1, -1, -1, -1]
1
/ \
2 3
/ \
4 5
Output: 1 3 2 4 5
I solved the problem using two stacks, one stack used to iterate from left to right and another one to iterate from right to left



• The left subtree of a node contains only nodes with data less than the node’s data.
• The right subtree of a node contains only nodes with data greater than the node’s data.
• Both the left and right subtrees must also be binary search trees.

Level 1:
All the nodes in the left subtree of 4 (2, 1, 3) are smaller
than 4, all the nodes in the right subtree of the 4 (5) are
larger than 4.
Level 2 :
For node 2:
All the nodes in the left subtree of 2 (1) are smaller than
2, all the nodes in the right subtree of the 2 (3) are larger than 2.
For node 5:
The left and right subtrees for node 5 are empty.
Level 3:
For node 1:
The left and right subtrees for node 1 are empty.
For node 3:
The left and right subtrees for node 3 are empty.
Because all the nodes follow the property of a binary search tree, the above tree is a binary search tree.
if the inorder traversal of the binary tree is in increasing order, then it's a binary search tree else not. So, just do a inorder traversal and store it in a temporary array, if it's in increasing order then it's a binary search tree else not


If the given matrix is:
[ [1, 2, 5],
[3, 4, 9],
[6, 7, 10]]
We have to find the position of 4. We will return {1,1} since A[1][1] = 4.
Naive approach : I told i will be traversing the entire matrix and if i get that element i will return else not
Efficient approach : Since this is sorted in row wise and column wise, I will start from the top right and compare, if the element is greater i will move downwards, if the element is smaller, i will move to the left. if we find the element we will return, if not then the element is not present



If the input tree is as depicted in the picture:
The Left View of the tree will be: 2 35 2
Since, i had very less time left so, I jumped directly into the efficient approach. To solve this problem i used the queue data structure, did a level order traversal and and always run a loop till the size of the queue and then printed the first element only where (i =1)
Design a parking lot. Where there is space for different kind of vehicles and for each vehicle the charges are different. If a parking is available the parking should be allotted, if not available then it should show a message saying the parking is full.
Tip 1: Try to understand the problem properly. Don't assume anything, Ask the requirements clearly.
Tip 2: then start designing the components one by one properly.
Tip 3: Learn the basic components of object oriented design
Some questions related to the project. Then what is Agile Methodologies, Do you know Software development life cycle. Areas of interest
Tip 1: Study some of the software engineering principles and methodologies

Here's your problem of the day
Solving this problem will increase your chance to get selected in this company
How do you remove whitespace from the start of a string?