Tip 1 : Practice DSA, it's very important for getting job.
Tip 2 : If you are preparing for sde2 , please study system design as well.
Tip 3 : You would expected to be really good in LLD, and fine in HLD as that comes at SD3 level mainly.
Tip 1: Mention your office work projects at the top.
Tip 2: List your skills after your projects.
To check you Problem solving through DSA questions.



Consider ARR = [“coding”, ”codezen”, ”codingninja”, ”coders”]
The longest common prefix among all the given strings is “cod” as it is present as a prefix in all strings. Hence, the answer is “cod”.
First I took 2 minutes to go through the question and sample cases. After that I told my approach that I will consider first string as LCP and then go to all the strings and check how much prefix matches with it. The time complexity for this one is O(n*m) where n is the size of array of strings and m is the length of the longest string in array. He asked to optimise the time complexity. I tried to reduced the number of comparison while comparing the strings.So I wrote the code for this time complexity only.
Later on checked the solution for reduced time complexity so it could be done using binary search, do check that.



1. You can return the list of values in any order. For example, if a valid triplet is {1, 2, -3}, then {2, -3, 1}, {-3, 2, 1} etc is also valid triplet. Also, the ordering of different triplets can be random i.e if there are more than one valid triplets, you can return them in any order.
2. The elements in the array need not be distinct.
3. If no such triplet is present in the array, then return an empty list, and the output printed for such a test case will be "-1".
Its a very popular problem. So initially I told the brute force solution that can be done in O(n^3) time complexity by having 3 nested loop and check all the possible combinations of triplets. Then I told the optimised approach where I first sort the array then have left and right pointer and check the sum for that triplet so here time complexity reduces to ~ O( n^2 log n).
The motive of this round was to judge a candidate based on his system design skills that includes Low level design(how you going to decide on the design patterns and solid principles) and High level design as well ( where they expect you to identify what kind of technologies you are going to choose like the database, cache, etc )
Design Parking Lot System.
Tip 1: After getting the question you can ask if requirements will be provided or you have to identify them. So that is the first part to start with.These Requirements involve : Actors, Model, Action.
Tip 2:Then one by one you can tell what all Classes you are going to create for these requirements in your code. Also explain what all design patterns you are going to use.
Tip 3: You can also include some unique features that are there in these big start-ups like Paytm. e.g. you could provide exciting offers to recurring users.
Tip 4: If interviewer ask you to build the data model you can do that or make it yourself; for that make sure you have good knowledge of DBMS like How we can reduce redundancy?
Tip 5: Which type of database you are going to use? Give reasons for that as well depending on your use case.
Tip 6: Include around 2-3 design patterns in your code.
The motive of this round was majorly focussed around High level design. It was Tech + Managerial round where the interviewer brief about the company as well.Round was in evening around 5 pm. He was a really good interviewer.Very open environment to clear all your doubts about the company.
Design HLD for Short url.
Tip 1: You start by asking for requirements, what all features will be there.List your functional and non functional requirements like it should be high available and low latency.
Tip 2: Here you are expected to find QPS, memory and CPU requirements.Will it be write heavy or read heavy ask that based on that find these metrics.
Tip 3: For this particular problem, which hash will you be using and what will be the length of the shorten url.
Tip 3: How you are going to integrate CAP theorem here. Interviewer can ask you to explain CAP theorem as well.
Tip 4: At the end draw the HLD for it including database, cache, kafka, load balancer whatever should be there according to you.

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