Tip 1 : Do Competitive Programming
Tip 2 : Give Mock Interviews
Tip 3 : Have some good fullstack projects in your resume to talk about in your interviews
Tip 1 : Mention things that you have done or the projects you have done in a clear and concise manner. Also mention only those things that you have utmost confidence in and can tackle any questions related to that in an interview. As the interviewer doesn't know you so your resume will be the place from where he would get to know you.
Tip 2 : The ordering should be experience (if any) on the top, then projects in that domain, then Skills and related coursework that you have done, then any PORs (add only the ones that are in the same field as the job you are applying for) and finally you achievements and they should be highlighted to stand out.
Round was early in the morning.



You are given ‘ARR’ = [7, 2, 6, 10, 8] and ‘M’ = 2. We split the array as [ 7, 2, 6] and [10, 8], the maximum of 7 + 2 + 6 and 10 + 8 is 18, which is the minimum possible.



'N' = 3, 'A' = {3, 1, 2, 3}, 'X' = 4, 'Y'= 2, 'SUM' = 14
For 'i' = 1, 'j' = 2, Value of the expression = 4 * 3 + 2 * 1 = 14.
For 'i' = 1, 'j' = 3, Value of the expression = 4 * 3 + 2 * 2 = 16.
For 'i' = 1, 'j' = 4, Value of the expression = 4 * 3 + 2 * 3 = 18.
For 'i' = 2, 'j' = 3, Value of the expression = 4 * 1 + 2 * 2 = 8.
For 'i' = 2, 'j' = 4, Value of the expression = 4 * 1 + 2 * 3 = 10.
For 'i' = 3, 'j' = 4, Value of the expression = 4 * 2 + 2 * 3 = 14.
The possible pairs are :
(1, 3), (3,4)
I used prefix sums and maths to calculate a formula for getting all values from 1 to n for all possible values of q. I then precalculated these values in O(n) to answer all of the queries in O(1)



String ‘P’ is lexicographically smaller than string ‘Q’, if :
1. There exists some index ‘i’ such that for all ‘j’ < ‘i’ , ‘P[j] = Q[j]’ and ‘P[i] < Q[i]’. E.g. “ninja” < “noder”.
2. If ‘P’ is a prefix of string ‘Q’, e.g. “code” < “coder”.
N = 4
A = [ “ab” , “abc” , “a” , “bp” ]
Explanation :
Only prefix of the string “a” is “a” which is present in array ‘A’. So, it is one of the possible strings.
Prefixes of the string “ab” are “a” and “ab” both of which are present in array ‘A’. So, it is one of the possible strings.
Prefixes of the string “bp” are “b” and “bp”. “b” is not present in array ‘A’. So, it cannot be a valid string.
Prefixes of the string “abc” are “a”,“ab” and “abc” all of which are present in array ‘A’. So, it is one of the possible strings.
We need to find the maximum length string, so “abc” is the required string.
I was not able to solve this problem
Round was early in the morning 10:00 AM


1. The grid has 0-based indexing.
2. A rotten orange can affect the adjacent oranges 4 directionally i.e. Up, Down, Left, Right.
Used multisource bfs from all the rotten oranges.




1. It is guaranteed that the given graph is DAG.
2. There will be no multiple edges and self-loops in the given DAG.
3. There can be multiple correct solutions, you can find any one of them.
4. Don’t print anything, just return an array representing the topological sort of the vertices of the given DAG.
It was around noon


If ‘N’ = 5, ‘ARR’ = {2, 4, 10, 8, 6}
You can rearrange ‘ARR’ to now become {2, 4, 6, 8, 10} this is an arithmetic progression. Therefore we will print “true”.
Used binary search and solved n^2logn



Can you solve this in O(N) time, and O(H) space complexity?
Used BST iterators for maintain inorder traversal and then used two sum logic
This round was in the afternoon and was completely based on design
Design the Database Schema of Spotify
Tip 1 : Be clear with Core Subjects
Tip 2 : Learn SQL queries and concepts like concurrency etc.


‘N’ = 5, ‘A’ = [3, 3, 2, 5, 1]
If we distribute candies in the following manner [4, 3, 2, 5, 1],
Each friend will be happy as they have at least received ‘A[i]’ candies, and no two friends got the same number of candies.
Hence, the answer is (4 + 3 + 2 + 5 + 1) = 15. It’s guaranteed that this is the minimum number of candies required.
It was in the evening, and was more of conversation based
Introduce Yourself.
Describe some situations from your life where you learned something or faced a problem or overcame some difficulty
Tip 1 : Don't lie in these or don't tell some fake situations
Tip 2 : Try to show how you actively did something to change the condition or act for better.

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