Tip 1: Focus on quality, not quantity.
Tip 2: Practice a limited number of standard problems but always revise solved problems before tackling new ones.
Tip 3: Be prepared to explain your projects in detail; most people mess up at this point.
Tip 1: Include links to coding platforms in your resume.
Tip 2: Incorporate all relevant keywords from the job description into your resume to increase the chances of getting shortlisted.
Timing: Morning 10-11 AM
The interviewer was on the SDE-3 profile. He was supportive, calm, and to the point, giving hints wherever needed.
His behaviour maintained a good environment throughout the interview.



Given an initial number x and two operations which are given below:
a) Multiply the number by 2.
b) Subtract 1 from the number.
The task is to find out the minimum number of operations required to convert the number x into y using only the above two operations. We can apply these operations any number of times.
Input : x = 4, y = 7
Output: 2
1. 4*2 = 8
2. 8-1 = 7
Step 1: I started my solution from x and tried to go until y.
Step 2: This solution did not cover all the cases, and the interviewer was also not happy with it.
Step 3: Then I started from y and went until x, and the problem was solved.



Given a string s of length n, find the alphabetically largest subsequence of length i possible for each i where (1 ≤ i ≤ n).
Note: A subsequence is a string left after deleting some or no characters from the original string without changing their order. For example, "ac" is a subsequence of "abcd" but "ca" is not.
Example
Consider s = "hrw". The alphabetically largest subsequence
of length 1 is "w".
of length 2 is "rw".
of length 3 is "hrw".
The answer is ["w", "rw", "hrw"], without quotes.
Step 1: Solved using a stack; for every length L, initialize a stack and traverse the string.
Step 2: If the current character is greater than the stack's top element and the string has sufficient characters remaining to fulfil the current length L after popping the top character, then pop it out; otherwise, continue.
Step 3: The interviewer was satisfied with the approach. I quickly coded it after the discussion.
Timing: Morning 10-11 AM
This was again the SDE-3 profile interviewer. He was supportive, calm, and to the point, giving hints wherever needed.
His behaviour maintained a good environment throughout the interview.



Given an array arr[] where each element represents the maximum number of steps that can be made forward from that index, the task is to find the minimum number of jumps to reach the end of the array starting from index 0.
Input: arr[] = {1, 3, 5, 8, 9, 2, 6, 7, 6, 8, 9}
Output: 3 (1-> 3 -> 9 -> 9)
Step 1: This was a standard problem(Jump game)
Step 2: I had solved this problem so I told the logic and coded quickly.
Step 3: The interview was happy and gave one more problem.



Given string str of lower case English alphabets. One can choose any two characters in the string and replace all the occurrences of the first character with the second character and replace all the occurrences of the second character with the first character. Find the lexicographically smallest string that can be obtained by doing this operation at most once.
Input: str = “ccad”
Output: aacd
Step 1: Traverse the array once to find which two characters should be swapped.
Step 2: Start from the beginning and find the smallest character in the remaining array that is smaller than the current character. If all remaining characters are bigger, repeat this for the next character.
Step 3: In a final traversal, swap all the occurrences.
It was an LLD round in the early morning from 10 to 11 AM.
A principal software engineer conducted the interview; he was very calm and helpful, asking every detail in a very friendly manner.



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.
Step 1: It was a standard design LRU cache problem with some modification
Step 2: So I quickly told the approach and then coded as well.
Step 3: Then the interviewer asked me a few questions to test my design pattern knowledge.
This was the HM round, also held in the early morning at 10 AM. However, the interviewer was not in a good mood. He finished the interview in 30 minutes and made me feel like my chances were over. Fortunately, due to my good performance in the first three interviews, I was able to proceed.
Mostly standard HM questions and about the project, I will list down a few
Prepare well, be confident and prepare well for cross-questions.

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