HashedIn interview experience Real time questions & tips from candidates to crack your interview

SDE - 2

HashedIn
upvote
share-icon
3 rounds | 4 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 6 Months
Topics: Data Structures, Algorithms, OOPS, System Design, Operating System
Tip
Tip

Tip 1 : Practice different types of questions for different data structures and Algorithms
Tip 2 : Make sure that you are consistent, Everyday do atleast questions.
Tip 3 : Keep a note of the questions for which you needed to check the solution, and revise anyone topic every weekend

Application process
Where: Other
Eligibility: Overall 65% marks in career
Resume Tip
Resume tip

Tip 1 : Keep it simple and clean, Keep only those things on which you are very confident
Tip 2 : Mention your achievements, Put the keywords that are used in the job description
Tip 3 : Mention your personal projects on the Resume as well

Interview rounds

01
Round
Medium
Video Call
Duration60 minutes
Interview date4 Apr 2021
Coding problem3

The interview was scheduled on Sunday morning. The interviewer was helpful and made me comfortable during the entire interview process.

1. Merge K Sorted Arrays

Moderate
15m average time
85% success
0/80
Asked in companies
MathworksMicrosoftOracle

You have been given ‘K’ different arrays/lists, which are sorted individually (in ascending order). You need to merge all the given arrays/list such that the output array/list should be sorted in ascending order.

Problem approach

Naive Approach:

Step 1: we will create an array of size = sum of size of the three arrays.
Step 2: Then we will loop through all the three arrays and add them inside the newly created array.
Step 3: We will sort the array.

The interviewer asked me to optimize the solution

Optimized approach:

Step 1: First we will sort two arrays, using two pointer approach where first pointer will traverse through the first array and second pointer will traverse through the second array.
Step 2: We compare the values present in the arrays pointed by there respective pointers and then whichever was smaller we will add them in the temp array and moved that respective pointer one step ahead.
Step 3: After second step , we have merged two sorted arrays, now we will follow the first and second step on the temporary array and the third array and add the results in the final array.

The interviewer asked me can i optimize it more:

Step 1: This time i used three pointers approach. the pointers pointing to the elements of the first, second and third array respectively.
Step 2: Now we will compare all the three elements and whichever is the smallest we will add that in the result array and then the respective pointer we will increment
Step 3: Now if any of the array is exhausted we will follow the same procedure in the previous method, where we merged two sorted arrays.

Now, the interviewer was satisfied

Try solving now

2. Merge K Sorted Arrays

Moderate
15m average time
85% success
0/80
Asked in companies
MathworksMicrosoftOracle

You have been given ‘K’ different arrays/lists, which are sorted individually (in ascending order). You need to merge all the given arrays/list such that the output array/list should be sorted in ascending order.

Problem approach

The time was left so i jumped to the optimized solution directly.

Step 1: Create a min heap of size k.
Step 2: Insert all the first elements of all the k arrays.
Step 3: we remove the minimum from the min heap and then add the next element from the array from which the element was taken. If the array doesn’t have any more elements, then we will not do anything.
Step 4: We will keep on doing step 3 until the heap is empty.

Try solving now

3. SQL Question

Can you please tell me what is having clause?

Problem approach

Tip 1 : First explain the definition
Tip 2 : Try to give one example where this will perfectly fit

02
Round
Hard
Video Call
Duration60 minutes
Interview date15 Apr 2021
Coding problem1

The interview was scheduled on weekday evening. The interviewer was very helpful and he introduced me first and then in a very calm and composed way he made me understand what his expectations are from this round.

1. System Design Question

Design a food delivery app like Zomato, Swiggy with the given functionalities:
1. User can see and order from different restaurants
2. Users can see the menu, Users can also cancel the order.
3. Restaurants can accept and reject the orders
4. Delivery Partners assignment, such that the delivery time should be reduced

Problem approach

Tip 1 : Understand the question first, don't assume anything. Ask questions to the interviewer
Tip 2 : Explain the DB structure first and then move to the high level design
Tip 3 : You should know the terms load balancing, consistent hashing, messaging queues etc.
Tip 4 : When asked for Low Level Design, go with the class/uml diagram and list out the dependencies and accordingly explain the class structures
Tip 5 : While writing any endpoints make sure, you add proper exceptions and comments.

03
Round
Easy
HR Round
Duration30 minutes
Interview date16 Apr 2021
Coding problem0

Some basic HR questions were asked. 

Here's your problem of the day

Solving this problem will increase your chance to get selected in this company

Skill covered: Programming

How do you remove whitespace from the start of a string?

Choose another skill to practice
Similar interview experiences
company logo
SDE - 2
3 rounds | 3 problems
Interviewed by HashedIn
1438 views
0 comments
0 upvotes
company logo
SDE - 2
3 rounds | 4 problems
Interviewed by HashedIn
2184 views
0 comments
0 upvotes
company logo
SDE - 2
3 rounds | 4 problems
Interviewed by HashedIn
835 views
0 comments
0 upvotes
company logo
SDE - 2
4 rounds | 5 problems
Interviewed by HashedIn
6393 views
1 comments
0 upvotes
Companies with similar interview experiences
company logo
SDE - 2
3 rounds | 4 problems
Interviewed by Arcesium
1828 views
0 comments
0 upvotes
company logo
SDE - 2
3 rounds | 4 problems
Interviewed by Ernst & Young (EY)
2595 views
0 comments
0 upvotes
company logo
SDE - 2
4 rounds | 8 problems
Interviewed by Newgen Software
0 views
0 comments
0 upvotes