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

SDE - 1

HashedIn
upvote
share-icon
4 rounds | 9 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 1 month
Topics: Data Structures, Low Level System Design, DBMS, Algorithms, OOPS
Tip
Tip

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

Application process
Where: Other
Eligibility: Above 7 CGPA
Resume Tip
Resume tip

Tip 1 : Mention your coding handles
Tip 2 : Also, mention about your project tech stacks

Interview rounds

01
Round
Medium
Online Coding Test
Duration90 minutes
Interview date7 Feb 2021
Coding problem3

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)

1. Chocolate Pickup

Hard
29m average time
0/120
Asked in companies
AppleOracleChegg Inc.

Ninja has a 'GRID' of size 'R' X 'C'. Each cell of the grid contains some chocolates. Ninja has two friends Alice and Bob, and he wants to collect as many chocolates as possible with the help of his friends.

Initially, Alice is in the top-left position i.e. (0, 0), and Bob is in the top-right place i.e. (0, ‘C’ - 1) in the grid. Each of them can move from their current cell to the cells just below them. When anyone passes from any cell, he will pick all chocolates in it, and then the number of chocolates in that cell will become zero. If both stay in the same cell, only one of them will pick the chocolates in it.

If Alice or Bob is at (i, j) then they can move to (i + 1, j), (i + 1, j - 1) or (i + 1, j + 1). They will always stay inside the ‘GRID’.

Your task is to find the maximum number of chocolates Ninja can collect with the help of his friends by following the above rules.

Example:
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.
Problem approach

I was able to pass only 1 test case out of 5

Try solving now

2. Trailing Zeros in Factorial

Moderate
15m average time
80% success
0/80
Asked in companies
UberGoldman SachsCapegemini Consulting India Private Limited

You are given an integer N, you need to find the number of trailing zeroes in N! (N factorial).

Note:

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.
Problem approach

I was able to pass only 3 test case out of 5

Try solving now

3. Find K’th Character of Decrypted String

Moderate
33m average time
0/80
Asked in companies
OptumAtlassianAdobe

You have been given an Encrypted String where repetitions of substrings are represented as substring followed by the count of substrings.

Example: String "aabbbcdcdcd" will be encrypted as "a2b3cd3".

You need to find the 'K'th character of Decrypted String. Decrypted String would have 1-based indexing.

Note :

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.
Problem approach

I was able to pass all test cases

Try solving now
02
Round
Medium
Video Call
Duration45 minutes
Interview date17 Feb 2021
Coding problem3

Standard DS/Algo round. It was at around 12 PM

1. Leaders in an array

Easy
15m average time
90% success
0/40
Asked in companies
AdobeMicrosoftQuikr

Given a sequence of numbers. Find all leaders in sequence. An element is a leader if it is strictly greater than all the elements on its right side.

Note:
1. Rightmost element is always a leader.

2. The order of elements in the return sequence must be the same as the given sequence
Example:
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.
Problem approach

Start the iteration from the right side and keep the track of the maximum array till that particular element of the array.

Try solving now

2. Find Two Missing Numbers

Moderate
25m average time
75% success
0/80
Asked in companies
OracleMorgan StanleyAdobe

You are given an array of unique integers where each element in the array is in the range [1, N]. The array has all distinct elements, and the array’s size is (N - 2). Hence, two numbers from the range are missing from this array. Your task is to return the two missing numbers.

For Example :

If ‘N’ = 6
[1, 3, 6, 5]
Then the output will be 2 4.
Problem approach

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.

Try solving now

3. Reverse the Linked List

Moderate
15m average time
85% success
0/80
Asked in companies
WalmartHCL TechnologiesInfo Edge India (Naukri.com)

Given a singly linked list of integers. Your task is to return the head of the reversed linked list.

For example:
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.
Follow Up :
Can you solve this problem in O(N) time and O(1) space complexity?
Problem approach

Solved by iterative approach

Try solving now
03
Round
Easy
Video Call
Duration35 minutes
Interview date19 Mar 2022
Coding problem1

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.

1. System Design Question

Design a music player like Spotify

Problem approach

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
 

04
Round
Easy
HR Round
Duration30 minutes
Interview date24 Mar 2022
Coding problem2

Interviewer was very friendly
And, timing was around 12.30 PM

1. Basic HR Question

Do you know anything about the company?

Problem approach

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.

2. Basic HR Question

Why should we hire you?

Problem approach

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

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 - 1
4 rounds | 8 problems
Interviewed by HashedIn
1267 views
0 comments
0 upvotes
company logo
SDE - 1
3 rounds | 3 problems
Interviewed by HashedIn
1026 views
0 comments
0 upvotes
company logo
SDE - 1
3 rounds | 5 problems
Interviewed by HashedIn
924 views
0 comments
0 upvotes
company logo
SDE - 1
3 rounds | 3 problems
Interviewed by HashedIn
718 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
SDE - 1
2 rounds | 3 problems
Interviewed by BNY Mellon
6365 views
3 comments
0 upvotes
company logo
SDE - 1
3 rounds | 6 problems
Interviewed by BNY Mellon
0 views
0 comments
0 upvotes
company logo
SDE - 1
3 rounds | 5 problems
Interviewed by CIS - Cyber Infrastructure
2197 views
0 comments
0 upvotes