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: 3 Months
Topics: Dynamic Programming, Trees, Linked Lists, Arrays, Binary Search, Graphs
Tip
Tip

Tip 1 : keep you data structures & algorithmic basic concepts strong
Tip 2 : do practice easy-medium questions on leetcode/GfG/other platforms
Tip 3 : prepare couple of good projects in final year to add in resume.

Application process
Where: Campus
Eligibility: NA
Resume Tip
Resume tip

Tip 1 : keep it short and concise and to the point (a technical recruiter doesn't want to know how many medals you won in art competition in school)
Tip 2 : don't lie on resume.

Interview rounds

01
Round
Medium
Online Coding Interview
Duration60 minutes
Interview date7 Sep 2021
Coding problem2

1. Sort 0 1 2

Easy
22m average time
0/40
Asked in companies
Expedia GroupWalmartHCL Technologies

You have been given an integer array/list(ARR) of size 'N'. It only contains 0s, 1s and 2s. Write a solution to sort this array/list.

Note :
Try to solve the problem in 'Single Scan'. ' Single Scan' refers to iterating over the array/list just once or to put it in other words, you will be visiting each element in the array/list just once.
Problem approach

I saw the constraints, it was larger..in range of 10^9, so had a thought that simple sorting (nLogn) won't work, upon reading problem couple of times I realized it is extension of Dutch National Flag problem (sort 0,1 2).

Try solving now

2. Shortest path in an unweighted graph

Moderate
25m average time
70% success
0/80
Asked in companies
AmazonMicrosoftGoldman Sachs

The city of Ninjaland is analogous to the unweighted graph. The city has ‘N’ houses numbered from 1 to ‘N’ respectively and are connected by M bidirectional roads. If a road is connecting two houses ‘X’ and ‘Y’ which means you can go from ‘X’ to ‘Y’ or ‘Y’ to ‘X’. It is guaranteed that you can reach any house from any other house via some combination of roads. Two houses are directly connected by at max one road.

A path between house ‘S’ to house ‘T’ is defined as a sequence of vertices from ‘S’ to ‘T’. Where starting house is ‘S’ and the ending house is ‘T’ and there is a road connecting two consecutive houses. Basically, the path looks like this: (S , h1 , h2 , h3 , ... T). you have to find the shortest path from ‘S’ to ‘T’.

For example
In the below map of Ninjaland let say you want to go from S=1 to T=8, the shortest path is (1, 3, 8). You can also go from S=1 to T=8  via (1, 2, 5, 8)  or (1, 4, 6, 7, 8) but these paths are not shortest.

altImage

Problem approach

I realized this is Graph related problem and shortest path finding approach has to be used.
I used Dijkstra algorithm to find out shortest available path and find out how much times I can avail discount in my total path (total%x) and subtracted it from my final result.

Try solving now
02
Round
Medium
Face to Face
Duration60 Minutes
Interview date21 Sep 2021
Coding problem2

started off with introduction then went on to coding problems, a google doc link was shared where I had to write working code.

1. Sort Array of 0s and 1s.

Easy
10m average time
90% success
0/40
Asked in companies
WalmartCapegemini Consulting India Private LimitedCoditas

You are given an array ‘A’ of size ‘N’ containing only 0s and 1s. You have to sort the array by traversing the array only once.

For Example:
For the following array:
[0 1 1 1 0 0 1]

The output should be [0 0 0 1 1 1 1].
Note:
You have to sort the array in place.
Try solving now

2. 3Sum

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

You are given an array/list ARR consisting of N integers. Your task is to find all the distinct triplets present in the array which adds up to a given number K.

An array is said to have a triplet {ARR[i], ARR[j], ARR[k]} with sum = 'K' if there exists three indices i, j and k such that i!=j, j!=k and i!=j and ARR[i] + ARR[j] + ARR[k] = 'K'.

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

I first used a hashmap based approach but it was running to n^2, upon discussion I came up to sorting+ 2 pointer approach which is more efficient (nLogn).

Try solving now
03
Round
Medium
Face to Face
Duration60 Minutes
Interview date22 Sep 2021
Coding problem4

Started off with project discussions and then coding problem and then a DB design problem, followed by OOPS,CN,OS related questions.

1. Row Of A Matrix With Maximum Ones

Moderate
20m average time
80% success
0/80
Asked in companies
AmazonUrban Company (UrbanClap)Microsoft

You are given a 2D matrix 'ARR' (containing either ‘0’ or ‘1’) of size 'N' x 'M', where each row is in sorted order.


Find the 0-based index of the first row with the maximum number of 1's.


Note :
If two rows have the same number of 1’s, return the row with a lower index.

If no row exists where at-least one '1' is present, return -1.


Example:
Input: ‘N’ = 3, 'M' = 3
'ARR' = 
[     [ 1,  1,  1 ],
      [ 0,  0,  1 ],
      [ 0,  0,  0 ]   ]

Output: 0

Explanation: The 0th row of the given matrix has the maximum number of ones.
Problem approach

I came up with a binary search based solution since each row is sorted (n*logn)
after further discussion and brainstorming came up with O(m+n) approach based on column wise traversal.
 

Try solving now

2. System Design Question

I was asked to design database for an online education application, which will be containing following entities: 
Class(Standard) , Subject, Marks, Average Marks, chapters, lesson url.
It was a very open discussion question.

Problem approach

Tip 1 : ask relevant questions, interviewer wanted to see how many real life scenarios you can think of and handle. 
Tip 2 : start decomposing the bigger problem into smaller chunks and start with discussing solution of them and then start connecting all of them to bigger solution.
Tip 3 : think out loud and try to grasp hints from interviewer.
Also practice these kind of questions before interviews.

3. OS Questions

What are semaphores?
What are various Scheduling Algorithms.
What is virtual memory?

4. DBMS Questions

What is Normalization?
Define/Explain Deadlock.

04
Round
Easy
HR Round
Duration45 minutes
Interview date28 Sep 2021
Coding problem1

Normal HR discussion

1. Basic HR Questions

Why Hashedin? 

me about your college life. 

Project discussion from resume, and what new feature will you add if asked to create that project again from scratch. 

Why Should we Hire you?

Problem approach

Tip 1 : Be honest
Tip 2 : Be confident
Tip 3 : Ask relevant questions

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
2198 views
0 comments
0 upvotes