Tip 1 : Practise Atleast 500 questions
Tip 2 : Do Atleast 3 projects
Tip 3 : Atleast 1 internship experience
Tip 1 : Add your coding background
Tip 2 : Add at least 3 projects and 1 internship experience
Intro and projects discussion: 15 minutes
2 coding questions: 40 minutes
Questions: 5 minutes



‘N’ = 3, ‘coins’ = {1, 2, 3}, ‘freq’ = {1, 1, 3}, ‘V’ = 6
For the given example, we can make six by using the following coins:
{1, 2, 3}
{3. 3}
Hence, the answer is 2.
I first applied recursive approach. It was not good enough
I then applied DP approach and solved it using memoization.



maxProfit = 0
if price[i] > price[i – 1]
maxProfit = maxProfit + price[i] – price[i – 1]
maxProfit = 0;
if price[i] > price[i – 1]
maxProfit = maxProfit + price[i] – price[i – 1]
Intro and projects discussion: 15 minutes
2 coding questions: 40 minutes
Questions: 5 minutes



The width of each bar is the same and is equal to 1.
Input: ‘n’ = 6, ‘arr’ = [3, 0, 0, 2, 0, 4].
Output: 10
Explanation: Refer to the image for better comprehension:

You don't need to print anything. It has already been taken care of. Just implement the given function.
Search from left to right and maintain a max height of left and right separately, which is like a one-side wall of partial container. Fix the higher one and flow water from the lower part. For example, if current height of left is lower, we fill water in the left bin. Until left meets right, we filled the whole container.



• 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.
1. All the elements of the Binary Search Tree are unique.
2. You can’t use the same node value/element of BST twice.
tree: 8 5 10 2 6 -1 -1 -1 -1 -1 7 -1 -1
'K' = 13,

The nodes with values 8 and 5 as shown in the above figure gives sum equal to the given target 13.
Therefore, the output will be “true” i.e it is possible to find a pair in the given BST having sum equal to ‘K’.
create an auxiliary array and store the Inorder traversal of BST in the array. The array will be sorted as Inorder traversal of BST always produces sorted data. Once we have the Inorder traversal we can get the answer using 2 pointer approach
Intro and projects discussion: 15 minutes
2 coding questions: 40 minutes
Questions: 5 minutes



1. The helper function ‘knows’ is already implemented for you.
2. ‘knows(A, B)’ returns "false", if A doesn't know B.
3. You should not implement helper function ‘knows’, or speculate about its implementation.
4. You should minimize the number of calls to function ‘knows(A, B)’.
5. There are at least 2 people at the party.
6. At most one celebrity will exist.
-Create two indices i and j, where i = 0 and j = n-1
-Run a loop until i is less than j.
-Check if i knows j, then i can’t be a celebrity. so increment i, i.e. i++
-Else j cannot be a celebrity, so decrement j, i.e. j–
-Assign i as the celebrity candidate
-Now at last check that whether the candidate is actually a celebrity by re-running a loop from 0 to n-1 and
constantly checking that if the candidate knows a person or if there is a candidate who does not know the
candidate, then we should return -1. else at the end of the loop, we can be sure that the candidate is actually
a celebrity.
Design an Api which implement 3 function:
1: Search in a list(Employees) on the basis of params
2: Add in a list
3: Remove from a list(with Employee ID)
Tip 1 : Have a grip on Low level designs
Tip 2 : Apply the concept of Oops

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?