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, Algorithms, DBMS, High Level Design, Low Level Design
Tip
Tip

Tip 1 : Practice questions everyday
Tip 2 : Learn OOPS concepts properly
Tip 3 : Also, try to learn the design principles

Application process
Where: Referral
Eligibility: 60% above overall
Resume Tip
Resume tip

Tip 1 : Your resume should be clean and crisp. Mention your projects well
Tip 2 : Don't Lie on your resume

Interview rounds

01
Round
Medium
Online Coding Test
Duration60 Minutes
Interview date8 Jun 2021
Coding problem2

It was an online round

1. Spiral Order Traversal of a Binary Tree

Easy
20m average time
75% success
0/40
Asked in companies
PayUAtlassianAmazon

You have been given a binary tree of 'N' nodes. Print the Spiral Order traversal of this binary tree.

For example
For the given binary tree [1, 2, 3, -1, -1, 4, 5, -1, -1, -1, -1]
    1
   / \
  2   3
     / \
    4   5

Output: 1 3 2 4 5
Problem approach

I solved the problem using two stacks, one stack used to iterate from left to right and another one to iterate from right to left

Try solving now

2. Validate BST

Moderate
25m average time
0/80
Asked in companies
FacebookAmazonFreshworks

You have been given a binary tree of integers with N number of nodes. Your task is to check if that input tree is a BST (Binary Search Tree) or not.

A binary search tree (BST) is a binary tree data structure which has the following properties.

• The left subtree of a node contains only nodes with data less than the node’s data.
• The right subtree of a node contains only nodes with data greater than the node’s data.
• Both the left and right subtrees must also be binary search trees.
Example :

BST1

Answer :

Level 1: 

All the nodes in the left subtree of 4 (2, 1, 3) are smaller 
than 4, all the nodes in the right subtree of the 4 (5) are 
larger than 4.

Level 2 :

For node 2:
All the nodes in the left subtree of 2 (1) are smaller than 
2, all the nodes in the right subtree of the 2 (3) are larger than 2.
For node 5:
The left and right subtrees for node 5 are empty.

Level 3:

For node 1:
The left and right subtrees for node 1 are empty.
For node 3:
The left and right subtrees for node 3 are empty.

Because all the nodes follow the property of a binary search tree, the above tree is a binary search tree.
Problem approach

if the inorder traversal of the binary tree is in increasing order, then it's a binary search tree else not. So, just do a inorder traversal and store it in a temporary array, if it's in increasing order then it's a binary search tree else not

Try solving now
02
Round
Medium
Face to Face
Duration60 Minutes
Interview date12 Jun 2021
Coding problem2

1. Search In A Row Wise And Column Wise Sorted Matrix

Moderate
15m average time
80% success
0/80
Asked in companies
NoBrokerOracleGoldman Sachs

You are given an 'N * N' matrix of integers where each row and each column is sorted in increasing order. You are given a target integer 'X'.


Find the position of 'X' in the matrix. If it exists then return the pair {i, j} where 'i' represents the row and 'j' represents the column of the array, otherwise return {-1,-1}


For example:
If the given matrix is:
[ [1, 2, 5],
  [3, 4, 9],
  [6, 7, 10]] 
We have to find the position of 4. We will return {1,1} since A[1][1] = 4.
Problem approach

Naive approach : I told i will be traversing the entire matrix and if i get that element i will return else not

Efficient approach : Since this is sorted in row wise and column wise, I will start from the top right and compare, if the element is greater i will move downwards, if the element is smaller, i will move to the left. if we find the element we will return, if not then the element is not present

Try solving now

2. Left View Of Binary Tree

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

You have been given a Binary Tree of 'n' nodes, where the nodes have integer values



Example :
If the input tree is as depicted in the picture: 

alt text

The Left View of the tree will be:  2 35 2 
Problem approach

Since, i had very less time left so, I jumped directly into the efficient approach. To solve this problem i used the queue data structure, did a level order traversal and and always run a loop till the size of the queue and then printed the first element only where (i =1)

Try solving now
03
Round
Hard
Face to Face
Duration60 Minutes
Interview date15 Jun 2021
Coding problem1

1. System Design Question

Design a parking lot. Where there is space for different kind of vehicles and for each vehicle the charges are different. If a parking is available the parking should be allotted, if not available then it should show a message saying the parking is full.

Problem approach

Tip 1: Try to understand the problem properly. Don't assume anything, Ask the requirements clearly.
Tip 2: then start designing the components one by one properly.
Tip 3: Learn the basic components of object oriented design

04
Round
Easy
HR Round
Duration30 Minutes
Interview date17 Jun 2021
Coding problem1

1. Project based questions

Some questions related to the project. Then what is Agile Methodologies, Do you know Software development life cycle. Areas of interest

Problem approach

Tip 1: Study some of the software engineering principles and methodologies
 

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