Tip 1 : Practice Atleast 100+ questions
Tip 2 : Clear with your approach and time-space complexity of your approach
Tip 3 : Also focus on low-level design
Tip 1 : Mention your coding handles
Tip 2 : Also, mention about your project tech stacks
It consists of 3 questions:
The first question was related to DP (Hard)
Second was related to math(Easy)
Third was related to string (Medium)



Input: ‘R’ = 3, ‘C’ = 4
‘GRID’ = [[2, 3, 1, 2], [3, 4, 2, 2], [5, 6, 3, 5]]
Output: 21
Initially Alice is at the position (0,0) he can follow the path (0,0) -> (1,1) -> (2,1) and will collect 2 + 4 + 6 = 12 chocolates.
Initially Bob is at the position (0, 3) and he can follow the path (0, 3) -> (1,3) -> (2, 3) and will colllect 2 + 2 + 5 = 9 chocolates.
Hence the total number of chocolates collected will be 12 + 9 = 21. there is no other possible way to collect a greater number of chocolates than 21.
I was able to pass only 1 test case out of 5



1. Trailing zeros in a number can be defined as the number of continuous suffix zeros starting from the zeroth place of a number.
2. For example, if a number X = 1009000, then the number of trailing zeros = 3 where the zeroth place is 0, the tenth place is 0, the hundredth place is 0.
3. ! means “FACTORIAL”. Factorial of a number is calculated by the product of the integer and all integers below it till 1.
4. Value of 0! is 1.
I was able to pass only 3 test case out of 5



Example: String "aabbbcdcdcd" will be encrypted as "a2b3cd3".
Input string will always be lowercase characters without any spaces.
If the count of a substring is 1 then also it will be followed by Integer '1'.
Example: "aabcdee" will be Encrypted as "a2bcd1e2"
This means it's guaranteed that each substring is followed by some Integer.
Also, the frequency of encrypted substring can be of more than one digit. For example, in "ab12c3", ab is repeated 12 times. No leading 0 is present in the frequency of substring.
The frequency of a repeated substring can also be in parts.
Example: "aaaabbbb" can also have "a2a2b3b1" as Encrypted String.
I was able to pass all test cases
Standard DS/Algo round. It was at around 12 PM



1. Rightmost element is always a leader.
2. The order of elements in the return sequence must be the same as the given sequence
The given sequence is 13, 14, 3, 8, 2 .
13 Not a leader because on the right side 14 is greater than 13.
14 lt is a leader because no one greater element in the right side.
3 Not a leader because on the right side 8 are greater than 3.
8 It is a leader because no one greater element on the right side.
2 It is a leader because it is the rightmost element in a sequence.
Hence there are 3 leaders in the above sequence which are 14, 8, 2.
Start the iteration from the right side and keep the track of the maximum array till that particular element of the array.



If ‘N’ = 6
[1, 3, 6, 5]
Then the output will be 2 4.
First I solved this question in O(n) space and O(n) time then they asked me to optimize it and solve it without extra space.



The given linked list is 1 -> 2 -> 3 -> 4-> NULL. Then the reverse linked list is 4 -> 3 -> 2 -> 1 -> NULL and the head of the reversed linked list will be 4.
Can you solve this problem in O(N) time and O(1) space complexity?
Solved by iterative approach
First, he asked me to introduce myself.
Then, he told me that as you know this is a design round so design a music player like Spotify.
First, I have designed the database using tables and Primary and Foreign Keys.
Then, he told me to write the code for it and told me that before I write the code tell me that which data structure will you use and why?
Then, he discussed with me for around 10 to 15 min that why am I using particular DS and why not someone else and what will be the problem in a particular data structure, and how will certain DS perform in case of various operations like searching, adding, deleting the songs in the music player.
Then, he told me to write the code for a playlist of this music player with all possible operations.
Design a music player like Spotify
Tip 1 : First design the database and show them the database schema
Tip 2 : Then share your approach and data structures which you'll use
Interviewer was very friendly
And, timing was around 12.30 PM
Do you know anything about the company?
General Tip : Before an interview for any company, have a brief insight about the company, what it does, when was it founded and so on. All these info can be easily acquired from the Company Website itself.
Why should we hire you?
Tip 1 : The cross-questioning can go intense sometimes, think before you speak.
Tip 2 : Be open-minded and answer whatever you are thinking, in these rounds, I feel it is important to have an opinion.
Tip 3 : Context of questions can be switched, pay attention to the details. It is okay to ask questions in these rounds, like what are the projects currently the company is investing in, which team you are mentoring, how is the work environment etc.
Tip 4 : Since everybody in the interview panel is from tech background, here too you can expect some technical questions. No coding in most of the cases but some discussions over the design can surely happen.

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?