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

SDE - 1

HashedIn
upvote
share-icon
4 rounds | 6 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 6 months
Topics: Data Structures, DBMS, Operating System, OOPS, Algorithms, Dynamic Programming, Web Development, System Design
Tip
Tip

Tip 1 : DSA is a must (Around 300+ questions)
Tip 2 : Good knowledge of core subjects like DBMS, OS, CN
Tip 3 : 2 Good projects + SQL and queries

Application process
Where: Campus
Eligibility: B.E/B.Tech, MCA, M. E/MTech, (CS, IT, IS,) with no active backlogs with 70% or 7.0 CGPA in B.Tech/ M.Tech/ MCA.
Resume Tip
Resume tip

Tip 1 : Good formatting of resume, have the knowledge of what you put into your resume
Tip 2 : should be a 1-page resume with at least 2 projects

Interview rounds

01
Round
Medium
Online Coding Test
Duration90 minutes
Interview date20 Nov 2021
Coding problem2

There were 3 coding questions. questions were implemented based on arrays and trees
Question 1 was Easy
Question 2 was Medium
Question 3 was Medium
all 3 questions were necessary to be selected for the next round.

1. Convert binary tree to mirror tree

Easy
15m average time
85% success
0/40
Asked in companies
AdobeWalmartThales

Given a binary tree, convert this binary tree into its mirror tree.

A binary tree is a tree in which each parent node has at most two children.

Mirror of a Tree: Mirror of a Binary Tree T is another Binary Tree M(T) with left and right children of all non-leaf nodes interchanged.

alt text

Note:
1. Make in-place changes, that is, modify the nodes given a binary tree to get the required mirror tree.
Try solving now

2. Min Jumps

Easy
15m average time
85% success
0/40
Asked in companies
AckoHSBCIBM

You live in a Ninja town which is in the form of a N * M grid. In this town, people travel from one place to another by jumping over the buildings which are present in each cell of the grid. It is Christmas eve, and Santa wants to give gifts and chocolates to the kids who live in the building which is present at the cell (N - 1, M - 1). Initially, Santa is present on cell (0, 0). Since Santa is in a hurry, help him find a path from starting point to the endpoint with the least amount of time.

The Santa may go only from one building to any of its adjacent buildings which is present either to the right or to the bottom or bottom right cell i.e. if the current position is (x, y), he may go to (x + 1, y + 1) or (x + 1, y) or (x, y + 1) given that the new coordinates are in the grid. The time taken to reach from one building to another is equal to the absolute difference between the heights of buildings.

Note:

1. The heights of the buildings are positive.
2. Santa starts from the cell (0, 0) and he has to reach the building (N - 1, M - 1).
3. Santa cannot leave the grid at any point of time.
Try solving now
02
Round
Medium
Video Call
Duration60 minutes
Interview date26 Nov 2021
Coding problem2

It was DSA based round where there was some discussion on the project followed by 2 coding questions, I had to explain my approach and write the code on Google Docs.

1. Anagram Pairs

Moderate
30m average time
60% success
0/80
Asked in companies
AdobeThought WorksHSBC

You are given two strings 'str1' and 'str1'.


You have to tell whether these strings form an anagram pair or not.


The strings form an anagram pair if the letters of one string can be rearranged to form another string.

Pre-requisites:

Anagrams are defined as words or names that can be formed by rearranging the letters of another word. Such as "spar" can be formed by rearranging letters of "rasp". Hence, "spar" and "rasp" are anagrams. 

Other examples include:

'triangle' and 'integral'
'listen' and 'silent'
Note:
Since it is a binary problem, there is no partial marking. Marks will only be awarded if you get all the test cases correct. 
Problem approach

I first explained the naive approach of O(n^2) time complexity, then Interviewer asked me to optimize the solution.
So I made use of a dictionary to reduce the time complexity and the interviewer was happy with it.

Try solving now

2. Longest Mountain Subarray

Easy
10m average time
90% success
0/40
Asked in companies
MicrosoftGoldman SachsShareChat

You are given an array of 'N' integers denoting the heights of the mountains. You need to find the length of the longest subarray which has the shape of a mountain.

A mountain subarray is defined as a subarray which consists of elements that are initially in ascending order until a peak element is reached and beyond the peak element all other elements of the subarray are in decreasing order.

Example:
If the given array is: [1 3 1 4]. The longest mountain subarray would be 3. This is because the longest mountain is  [1 3 1] having length 3.
Problem approach

I first explained the naive approach of O(n^2) time complexity, then Interviewer asked me to optimize the solution. So I used the concept of peaks to calculate largest peaks and store its length in a variable containing the largest length

Try solving now
03
Round
Easy
Video Call
Duration75 minutes
Interview date26 Nov 2021
Coding problem1

This round mainly revolved around a system design for an e-commerce website, then some DBMS queries followed by interview questions on OS, DBMS, and Computer Networks. Also there was some discussion of project, how it works, why I made the project, etc.

1. System Design Question

Build the db design for an e-commerce application.
Functionalities:
Users can order a product.
A product can have multiple categories.
Users should be able to order multiple products and pay for it.
The application should be able to handle the inventory of products.

Think about Data modeling, Data querying and how will you build this application for the end-user?
Also, the system should be highly available and resilient to failures.

Problem approach

Tip 1 : Think of all possible entities and attributes
Tip 2 : Make Correct Relations between entities
Tip 3 : Read 2-3 system designs before interview

04
Round
Easy
HR Round
Duration30 Minutes
Interview date29 Nov 2021
Coding problem1

Some HR questions were asked like other offers, Why do you wanna join Hashedin, and strengths and weaknesses.
After that a puzzle was asked which I correctly answered

1. Puzzle

A man is walking down the village road with a tiger, a goat, and a bundle of grass. Soon he arrives at the river bank where there is one tiny boat that can carry him and another animal or grass at a time. Here is the problem: Left alone, the tiger will eat the goat. And similarly, the goat will eat the grass bundle. How is he going to take all three across the river safely?

Problem approach

Tip 1 : Read more and more puzzles before interview
 

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
1266 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
923 views
0 comments
0 upvotes
company logo
SDE - 1
3 rounds | 3 problems
Interviewed by HashedIn
717 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