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

SDE - 1

HashedIn
upvote
share-icon
4 rounds | 10 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 1 month
Topics: Data Structures, OOPS, System Design(LLD), DBMS + MySQL, Operating Systems
Tip
Tip

Tip 1 : Practice DSA questions from Trees and basic DP problems
Tip 2 : Try referring Striver SDE sheet before interview (Many questions were asked from it)
Tip 3 : Try some questions from Codility platform as written test will be on Codility.

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

Tip 1 : Have some projects on resume.
Tip 2 : Do not put false things on resume.

Interview rounds

01
Round
Medium
Online Coding Test
Duration180 minutes
Interview date30 Jan 2022
Coding problem2

1. Equilibrium Index

Easy
0/40
Asked in companies
Chegg Inc.Goldman SachsCoinbase

You are given an array Arr consisting of N integers. You need to find the equilibrium index of the array.

An index is considered as an equilibrium index if the sum of elements of the array to the left of that index is equal to the sum of elements to the right of it.

Note:

1. The array follows 0-based indexing, so you need to return the 0-based index of the element.
2. Note that the element at the equilibrium index won’t be considered for either left sum or right sum.
3. If there are multiple indices which satisfy the given condition, then return the left-most index i.e if there are indices i,j,k…. which are equilibrium indices, return the minimum among them
4. If no such index is present in the array, return -1.
Problem approach

I have solved it with the most optimized solution.

Try solving now

2. Compress the String

Moderate
32m average time
60% success
0/80
Asked in companies
MicrosoftArcesiumAmazon

Write a program to do basic string compression. For a character which is consecutively repeated more than once, replace consecutive duplicate occurrences with the count of repetitions.

Example:
If a string has 'x' repeated 5 times, replace this "xxxxx" with "x5".
The string is compressed only when the repeated character count is more than 1.
Note:
Consecutive count of every character in the input string is less than or equal to 9. You are not required to print anything. It has already been taken care of. Just implement the given function and return the compressed string.
Problem approach

I have solved it with the most optimized solution.

Try solving now
02
Round
Medium
Video Call
Duration90 minutes
Interview date2 Feb 2022
Coding problem2

Durantion: 45 minutes (Mine went for 90 minutes)

I was asked questions from CS fundamentals. The interviewer covered all the core subjects (OOPs/ DBMS/ OS/ CN).
Then we jumped into DSA.

1. Target Sum

Moderate
0/80
Asked in companies
OLX GroupZSAmazon

You are given an array ‘ARR’ of ‘N’ integers and a target number, ‘TARGET’. Your task is to build an expression out of an array by adding one of the symbols '+' and '-' before each integer in an array, and then by concatenating all the integers, you want to achieve a target. You have to return the number of ways the target can be achieved.

For Example :
You are given the array ‘ARR’ = [1, 1, 1, 1, 1], ‘TARGET’ = 3. The number of ways this target can be achieved is:
1. -1 + 1 + 1 + 1 + 1 = 3
2. +1 - 1 + 1 + 1 + 1 = 3
3. +1 + 1 - 1 + 1 + 1 = 3
4. +1 + 1 + 1 - 1 + 1 = 3
5. +1 + 1 + 1 + 1 - 1 = 3
These are the 5 ways to make. Hence the answer is 5.
Problem approach

I began by explaining the brute force approach to him, then progressed to the best optimal solution while also explaining the time and space complexity.

Try solving now

2. Search In BST

Easy
15m average time
85% success
0/40
Asked in companies
LinkedInAckoErnst & Young (EY)

There is a Binary Search Tree (BST) consisting of ‘N’ nodes. Each node of this BST has some integer data.


You are given the root node of this BST, and an integer ‘X’. Return true if there is a node in BST having data equal to ‘X’, otherwise return false.


A binary search tree (BST) is a binary tree data structure that has the following properties:

1. The left subtree of a node contains only nodes with data less than the node’s data.

2. The right subtree of a node contains only nodes with data greater than the node’s data.

3. The left and right subtrees must also be binary search trees.
Note:
It is guaranteed that all nodes have distinct data.
Problem approach

It took me some time to reach to the solution and then we had discussion on Level order tree traversal.

Try solving now
03
Round
Medium
Video Call
Duration45 minutes
Interview date3 Feb 2022
Coding problem5

It started with basic questions on introduction and then I was asked questions on my projects.

Generally, This round revolves around “Low-Level Design” or “Database schema Design”. However, I was just asked about the approach to design a database.

And then the interviewer shared a google docs link with me where he designed two tables (Employee table and Project table) and then asked me to write SQL queries

1. DBMS Question

Write a SQL query to find the 3rd Highest Salary in the table.

2. DBMS Question

Write a SQL query to fetch the Employee name (in Employee table) and Project name (in Project table) having same project id.

3. Merge Two Sorted Arrays

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

Ninja has been given two sorted integer arrays/lists ‘ARR1’ and ‘ARR2’ of size ‘M’ and ‘N’. Ninja has to merge these sorted arrays/lists into ‘ARR1’ as one sorted array. You may have to assume that ‘ARR1’ has a size equal to ‘M’ + ‘N’ such that ‘ARR1’ has enough space to add all the elements of ‘ARR2’ in ‘ARR1’.

For example:

‘ARR1’ = [3 6 9 0 0]
‘ARR2’ = [4 10]
After merging the ‘ARR1’ and ‘ARR2’ in ‘ARR1’. 
‘ARR1’ = [3 4 6 9 10]
Problem approach

I began by explaining the brute force approach to him, then progressed to the best optimal solution while also explaining the time and space complexity.

Try solving now

4. Next Greater Element

Easy
10m average time
90% success
0/40
Asked in companies
IBMInfo Edge India (Naukri.com)Amazon

You are given an array 'a' of size 'n'.



The Next Greater Element for an element 'x' is the first element on the right side of 'x' in the array, which is greater than 'x'.


If no greater elements exist to the right of 'x', consider the next greater element as -1.


For example:
Input: 'a' = [7, 12, 1, 20]

Output: NGE = [12, 20, 20, -1]

Explanation: For the given array,

- The next greater element for 7 is 12.

- The next greater element for 12 is 20. 

- The next greater element for 1 is 20. 

- There is no greater element for 20 on the right side. So we consider NGE as -1.
Problem approach

I began by explaining the brute force approach to him, then progressed to the best optimal solution while also explaining the time and space complexity.

Try solving now

5. System Design

Database design of a banking application.

04
Round
Easy
HR Round
Duration30 minutes
Interview date3 Feb 2022
Coding problem1

1. Basic HR Questions

What were the challenges faced while working in a college society? (Also, challenges faced while working in a team for Minor Project?) 

What technologies have you been working on? 

Why HashedIn? 

What is its area of expertise? 

What is HashedIn University? 

Do you intend to pursue higher studies?

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
1027 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