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 unnecesary details on Resume
Tip 2 : Make It look clean and also keep it of one page
This is an online assessment round consisting of 4 DSA problems of medium-hard range. The duration of the round is 60 minutes.
L = 2, R = 9
All the numbers between L and R and their binary representations are:
X = 2 => 10
X = 3 => 11
X = 4 => 100
X = 5 => 101
X = 6 => 110
X = 7 => 111
X = 8 => 1000
X = 9 => 1001
As 4 and 9 are the only numbers with two zeroes in their binary representations, hence the answer is 2.
L = 2, R = 9
All the numbers between L and R and their binary representations are:
X = 2 => 10
X = 3 => 11
X = 4 => 100
X = 5 => 101
X = 6 => 110
X = 7 => 111
X = 8 => 1000
X = 9 => 1001
As 4 and 9 are the only numbers with two zeroes in their binary representations, hence the answer is 2.





In the below histogram where array/list elements are {2, 1, 5, 6, 2, 3}.
The area of largest rectangle possible in the given histogram is 10.
This is a F2F interview round through google meet. The interviewer started with asking my intro and then asked a DSA question.
As the round is only for 40-45 minutes, he told me not to write the code as he is satisfied with the explanation. Then he told me about his work at zomato and his recent achievements. I asked a few doubts regarding his work and how did they tackle a few problems (about the search option in the Zomato app as the interviewer worked on this particularly). This discussion went on for another 5 minutes and he ended the interview by adding a few points on work culture at zomato.



1. get(key) - Return the value of the key if the key exists in the cache, otherwise return -1.
2. put(key, value), Insert the value in the cache if the key is not already present or update the value of the given key if the key is already present. When the cache reaches its capacity, it should invalidate the least recently used item before inserting the new item.
Type 0: for get(key) operation.
Type 1: for put(key, value) operation.
1. The cache is initialized with a capacity (the maximum number of unique keys it can hold at a time).
2. Access to an item or key is defined as a get or a put operation on the key. The least recently used key is the one with the oldest access time.
He first asked me to discuss my approach. I started with a basic brute force approach using 3-4 hashmaps and in linear time. Then I optimized it to O (log N) time complexity. I tried to convert it into O (1) time complexity using LinkedList. But my logic will not work for a few edge cases. He then gave a hint, and I am able to solve the question properly. It took around 30 minutes for the discussion of the approach to get an O (1) solution.

Here's your problem of the day
Solving this problem will increase your chance to get selected in this company
What is recursion?