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

SDE - Intern

HashedIn
upvote
share-icon
4 rounds | 7 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 1 month( dedicated )
Topics: Data Structures, Algorithms (covering arrays and strings), Dynamic Programming, Core Subjects(OOPs and DBMS), Low Level Design
Tip
Tip

Tip 1 : Should be thorough with Data Structures and Algorithms (atleast covering everything from array and strings, should know the basics of rest or the data structures)
Tip 2 : Must develop logic building skills, so that you are able to think for a new question that you haven't seen before.
Tip 3 : Must practice explaining your solution while thinking about it and please explain from the basics, do not assume anything on your own.
Tip 4 : I recommend to go through the Interview Experiences, try to solve as many distinct problems as possible.
Tip 5 : Know your subjects and project well so that you are confident and 100% sure in the interview, regarding what you know and what you don't.

Application process
Where: Other
Eligibility: 60% above throughout the education
Resume Tip
Resume tip

Tip 1 : Resume should be crisp and concise.
Tip 3 : Include points instead of paragraphs, include numbers if you can (ex. abc feature helped increase the productivity by xyz%)
Tip 2 : Don't write anything that you don't have a good knowledge of.
Tip 3 : It's a personal advice that you should not provide your leetcode links, because the interviewer won't be intrigued by giving you a problem that they can see you have already solved on leetcode or somewhere, You can add your leetcode points instead or cp profile link.

Interview rounds

01
Round
Medium
Online Coding Interview
Duration90 minutes
Interview date25 Jan 2022
Coding problem3

We were provided with a test link and were instructed to take the test within 24 hours.
It was a proctored test where you had to turn your camera on and you can not switch tabs,
There were 3 questions in total for which 3 to 5 example test cases were given to understand the question better, but the solutions were to be tested on a different set of hidden test cases (about 30 to 50 hidden test cases).

1. Minimum Character Deletion

Moderate
15m average time
80% success
0/80
Asked in companies
American ExpressDeutsche BankMeesho

You are given a string ‘STR’. You need to find and return the minimum number of characters to be deleted from ‘STR’ so that the frequency of each character in the string becomes unique.

Example:
If the given string is “aaBBccc” then the frequency of characters: { a:2, B:2, c:3 }. Now, as ‘a’ and ‘B’ both have the same frequency 2, we need to delete one character either one ‘a’ or one ‘B’, to make their frequency different. After deleting any character we will get frequency as 1,2 and 3, as they all are different. Thus we got our solution as 1.
Problem approach

A simple solution is to remove all subsequences one by one and check if the remaining string is palindrome or not. The time complexity of this solution is exponential.

An efficient approach uses the concept of finding the length of the longest palindromic subsequence of a given sequence. 

Algorithm: 

1. str is the given string.
2. n length of str
3. len be the length of the longest 
palindromic subsequence of str
4. minimum number of deletions 
min = n - len

Try solving now

2. Minimum Jumps

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

Bob lives with his wife in a city named Berland. Bob is a good husband, so he goes out with his wife every Friday to ‘Arcade’ mall.

‘Arcade’ is a very famous mall in Berland. It has a very unique transportation method between shops. Since the shops in the mall are laying in a straight line, you can jump on a very advanced trampoline from the shop i, and land in any shop between (i) to (i + Arr[i]), where Arr[i] is a constant given for each shop.

There are N shops in the mall, numbered from 0 to N-1. Bob's wife starts her shopping journey from shop 0 and ends it in shop N-1. As the mall is very crowded on Fridays, unfortunately, Bob gets lost from his wife. So he wants to know, what is the minimum number of trampoline jumps from shop 0 he has to make in order to reach shop N-1 and see his wife again. If it is impossible to reach the last shop, return -1.

Problem approach

A naive approach is to start from the first element and recursively call for all the elements reachable from first element. The minimum number of jumps to reach end from first can be calculated using minimum number of jumps needed to reach end from the elements reachable from first. 

minJumps(start, end) = Min ( minJumps(k, end) ) for all k reachable from start.

If the execution is traced for this method, it can be seen that there will be overlapping subproblems. For example, minJumps(3, 9) will be called two times as arr[3] is reachable from arr[1] and arr[2]. So this problem has both properties (optimal substructure and overlapping subproblems) of Dynamic Programming.

Method 2: Dynamic Programming. 
Approach: 

In this way, make a jumps[] array from left to right such that jumps[i] indicate the minimum number of jumps needed to reach arr[i] from arr[0].
To fill the jumps array run a nested loop inner loop counter is j and outer loop count is i.
Outer loop from 1 to n-1 and inner loop from 0 to i.
if i is less than j + arr[j] then set jumps[i] to minimum of jumps[i] and jumps[j] + 1. initially set jump[i] to INT MAX
Finally, return jumps[n-1].

Try solving now

3. 3 Divisors

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

You are given a positive integer ‘N’. Your task is to find all the positive integers between 1 and ‘N’ (both inclusive) that have exactly 3 divisors. Print these numbers in increasing order.

Note :
It is guaranteed that there is at least one such integer under given constraints.
Problem approach

Approach: The idea is very simple to solve this problem. Calculate the sum of digits of a given number and then for each index, remove that digit and try all possible digits from 0 to 9 and see if the sum is divisible by 3 or not. Follow the steps below to solve the problem:

Initialize the variable sum as 0 to store the sum of digits of the number.
Iterate over a range [0, N] using the variable i and perform the following steps:
Add the value of digit at i-th index in the variable sum.
Initialize the variable count as 0 to store the answer.
If the number itself is divisible by 3 then increment count by one.
Iterate over a range [0, N] using the variable i and perform the following steps:
Initialize the variable remaining_sum as sum-(number.charAt(i)-48).
Iterate over a range [0, 9] using the variable j and perform the following steps:
Add the value of j to the variable remaining_sum and if remaining_sum is divisible by 3 and j is not equal to the digit at i-th index, then add the value of count by 1.
After performing the above steps, print the value of count as the answer.

Try solving now
02
Round
Medium
Video Call
Duration50 minutes
Interview date27 May 2022
Coding problem1

The interview was scheduled on zoom in the afternoon.
It started with an introduction and went on for about 50 minutes.
Most of the time was spent on the problem and the discussion around it.
There were two members in the panel- Interviewer and shadow interviewer.
The interviewer was quite humble and kept chatting with me throughout the interview.

1. Group Anagrams Together

Moderate
0/80
Asked in companies
Dell TechnologiesPayPalArcesium

You have been given an array/list of strings 'STR_LIST'. You are supposed to return the strings as groups of anagrams such that strings belonging to a particular group are anagrams of one another.

Note :
An Anagram is a word or phrase formed by rearranging the letters of a different word or phrase. We can generalize this in string processing by saying that an anagram of a string is another string with the same quantity of each character in it, in any order.
Example:
{ “abc”, “ged”, “dge”, “bac” } 
In the above example the array should be divided into 2 groups. The first group consists of { “abc”, “bac” } and the second group consists of { “ged”, “dge” }.
Problem approach

I started with an approach where I would iterate over the list of words and then match every other word in the List to check if they are anagrams, If yes then I would store them together.
but this solution will take O(N^2) time complexity.

He then gave me a hint to maybe think about some other data structure that I can use - and it struck me to the idea of using hashmap 
and I landed on the following approach:
A simple method is to create a Hash Table. Calculate the hash value of each word in such a way that all anagrams have the same hash value. Populate the Hash Table with these hash values. Finally, print those words together with the same hash values. A simple hashing mechanism can be modulo sum of all characters. With modulo sum, two non-anagram words may have the same hash value. This can be handled by matching individual characters.

Here, we first sort each word, use the sorted word as a key and then put an original word on a map. The value of the map will be a list containing all the words which have the same word after sorting. 
Lastly, we will print all values from the hashmap where the size of values will be greater than 1.

He then appreciated the solution and asked me if the solution can be further optimized.
so I gave it a hard thought and I was hitting in the bushes trying to communicate with him and I'd say we collective came to the next approach:
In the previous approach, we were sorting every string in order to maintain a similar key, but that cost extra time in this approach will take the advantage of another hashmap to maintain the frequency of the characters which will generate the same hash function for different string having same frequency of characters.
Here, we will take HashMap, the inner hashmap will count the frequency of the characters of each string and the outer HashMap will check whether that hashmap is present or not if present then it will add that string to the corresponding list.

Try solving now
03
Round
Medium
Video Call
Duration60 minutes
Interview date28 May 2022
Coding problem1

The interview was scheduled on zoom in the afternoon.
It started with an introduction and went on for about 60 minutes.
Most of the time was spent on the problem and the discussion around it.
There were two members in the panel- Interviewer and shadow interviewer.
The interviewer was not very chatty this time and was very cautious of not giving away too much.

1. Excel Column Number

Easy
23m average time
0/40
Asked in companies
OYODirectiGoldman Sachs

You have been given a column title as appears in an Excel sheet, return its corresponding column number.

For example:
A -> 1
B -> 2
C -> 3
...
Z -> 26
AA -> 27
AB -> 28 
...
Problem approach

It was a new problem to me. I started with a complex solution having something to do with DP but soon realized that I was making it too complex. 
Then I noticed that I could derive a mathematical formula for the conversion. further going on with this solution I realized it's similar to converting binary to decimals bit instead base 2, it could be base 26.

ex. To convert CDA,
3*26*26 + 4*26 + 1
= 26(3*26 + 4) + 1
= 26(0*26 + 3*26 + 4) + 1

result = 26*result + s[i] - 'A' + 1

He then asked me what would be the case if the question was reversed.
I made some minor changes and come with a solution in little time.

Try solving now
04
Round
Easy
HR Round
Duration15 minutes
Interview date28 May 2022
Coding problem2

The interview was scheduled on zoom the same evening as 2nd technical round.
It started with an introduction and went on for about 15 minutes.
The interviewer was pretty chill and came in a fun mood.

1. Puzzles

He had asked 2 puzzles.
First was a classic puzzle we all must have solved in our childhood. - There is a farmer with a fox, a chicken and a bag of grains on one side of the river, there is a boat which he has to use to get to the other side with all 3 items intact/alive but he can only carry two items on the boat with him at once. the constrains are that if fox and chicken left alone the fox will eat the chicken, if chicken left alone with grains then chicken will eat the grains.

Problem approach

Tip 1 : Don't get nervous.
Tip 2 : Think with a cool mind.
Tip 3 : Thoroughly explain your approach

2. Basic HR Questions

Apart from this there were general questions like:
Family background
other offers + CTC
My Interests
Trending technologies

Problem approach

Tip 1 : Be confident and enthusiastic.
Tip 2 : Ask questions, it's not just an opportunity for them ti know you but for you also to know the company.
Tip 3 : Keep the conversation going.

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 - Intern
4 rounds | 5 problems
Interviewed by HashedIn
1208 views
0 comments
0 upvotes
company logo
SDE - Intern
4 rounds | 6 problems
Interviewed by HashedIn
1269 views
0 comments
0 upvotes
company logo
SDE - Intern
4 rounds | 8 problems
Interviewed by HashedIn
941 views
0 comments
0 upvotes
company logo
SDE - Intern
4 rounds | 7 problems
Interviewed by HashedIn
1393 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
SDE - Intern
2 rounds | 4 problems
Interviewed by Arcesium
3738 views
0 comments
0 upvotes
company logo
SDE - Intern
3 rounds | 5 problems
Interviewed by Arcesium
2683 views
0 comments
0 upvotes
company logo
SDE - Intern
3 rounds | 5 problems
Interviewed by BNY Mellon
2348 views
0 comments
0 upvotes