Tip 1 : Concentrate more on BT and BST
Tip 2 : Prepare your project well.
Tip 1: Keep it clean and concise
Tip 2: Use single page, ATS-compatible resume
OA was given during the evening slot at around 5 PM for a duration of 90 minutes. The platform was hackerrank and it was very user-friendly.



If V == 0, then 0 coins are required.
If V > 0 minCoins(coins[0..m-1], V) = min {1 + minCoins(V-coin[i])} where i varies from 0 to m-1 and coin[i] <= V



Height of a tree is the maximum number of nodes in a path from the node to the leaf node.
An empty tree is a height-balanced tree. A non-empty binary tree is a height-balanced binary tree if
1. The left subtree of a binary tree is already the height-balanced tree.
2. The right subtree of a binary tree is also the height-balanced tree.
3. The difference between heights of left subtree and right subtree must not more than ‘1’.
Input: Consider the binary tree given below:

Output: 'true'
Explanation:
Consider subtree at Node ( 7 )
Left subtree height is ‘0’ and right subtree height is ‘0’, the absolute height difference is ‘0-0 = 0’ and ‘0’ is not more than ‘1’ so subtree at Node ( 7 ) is a height-balanced binary tree.
Same for subtrees at Nodes ( 5, 6 ).
Consider subtree at Node ( 4 )
Left subtree height is ‘1’ and right subtree height is ‘0’, the absolute height difference is ‘1-0 = 1’ and ‘1’ is not more than ‘1’ so subtree at Node ( 4 ) is a height-balanced binary tree.
Same for subtree at Node ( 3)
Consider subtree at Node ( 2 )
Left subtree height is ‘2’ and right subtree height is ‘1’, the absolute height difference is ‘2-1 = 1’ and ‘1’ is not more than ‘1’ so subtree at Node ( 2 ) is a height-balanced binary tree.
Consider subtree at Node ( 1 )
Left subtree height is ‘3’ and right subtree height is ‘2’, the absolute height difference is ‘3-2 = 1’ and ‘1’ is not more than ‘1’ so subtree at Node ( 1 ) is a height-balanced binary tree.
Because the root node ( 1 ) is a height-balanced binary tree, so the complete tree is height-balanced.
-> The idea is to sort the given keys first.
-> Then the root will be the middle element of the sorted array, and we recursively construct the left subtree of the root by keys less than the middle element and the right subtree of the root by keys more than the middle element.
It was conducted in google meet platform



Input: 'n' = 3, 'k' = 2 and 'arr' = {1, 2, 3}
Output: 2
Explanation: The maximum possible minimum distance will be 2 when 2 cows are placed at positions {1, 3}. Here distance between cows is 2.
We can use binary search to solve the problem. It is a standard problem of Aggressive Cows.



->Starting from node 0,check whether it is visited else called for dfs traversal each time for non visited node.
-> Once this recursion came to end,insert the node each time to stack.
-> Finally return the elements of the stack.
It was like a rapid-fire round, to be honest. The interviewer shooted around 15-20 questions related to OS and OOPS within a span of 10 minutes. The questions were of very basic type and a bit medium. Topics include semaphore, paging, virtual memory, bankers algo, deadlock conditions, ram vs rom, class vs struct, polymorphism etc.
Tip 1: Be perfect with the basics of OOPS.
Tip 2: Revise the concepts of OS and focus on deadlock.
It was a technical interview round taken around 1 PM. The interviewer was very friendly and helpful. First there was resume discussion for 10 minutes and he went on through it line by line asking about the skills mentioned. Then we briefly discussed my project and then technical part started.

• Start Time, denoting the start time of the job.
• End Time, denoting the end time of the job.
• Profit associated with the job.
Let there be three jobs ‘A’, ‘B’, and ‘C’-
• Start time, End time and profit associated with job ‘A’ being 1, 1 and 30.
• Start time, End time and profit associated with job ‘B’ being 1, 2 and 40.
• Start time, End time and profit associated with job ‘C’ being 3, 4 and 30.
We will perform job ‘B’ at time t = 1 and job ‘C’ at time t = 3. The total profit will be 70. There is no other sequence of jobs which can fetch us a better overall profit.
Sort all jobs in decreasing order of profit.
Iterate on jobs in decreasing order of profit.For each job , do the following :
Find a time slot i, such that slot is empty and i < deadline and i is greatest.Put the job in
this slot and mark this slot filled.
If no such i exists, then ignore the job.

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?