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

SDE - 1

HashedIn
upvote
share-icon
3 rounds | 8 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 6 months
Topics: Data Structures, OOPS, Algorithms, Reactjs, System Design, Javascript
Tip
Tip

Tip 1 : Practise core topics such as DSA, oops well. 
Tip 2 : Various sources such as Leetcode, GFG, and Hackerrank come in handy for practising. 
Tip 3 : Practice with friends, present your solution in front of them, and do mock interviews.
Tip 4 : Do a project and learn about the tech used and the functionalities of your project.

Application process
Where: Campus
Eligibility: No Backlogs in previous semesters
Resume Tip
Resume tip

Tip 1 : Mention your achievement and the projects done. 
Tip 2 : If there's an experience to be added, mention the tech learned and the contribution done during the internships/job. 
Tip 3 : Do not put false things on the resume which you can not back up during the interview.

Interview rounds

01
Round
Medium
Online Coding Interview
Duration90 minutes
Interview date31 Jan 2022
Coding problem2

The time of the test was 6 PM. It was a virtual test conducted on codility platform. There were 3 questions asked.

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 used 2 loops. The outer loop iterates through all the elements and the inner loop find out whether the current index picked by the outer loop is the equilibrium index or not. The time complexity of this solution was O(n^2).

Try solving now

2. Fair Indexes

Moderate
0/80
Asked in companies
SAP LabsMicrosoftHashedIn

Levi Ackerman has two arrays, ‘A’ and ‘B’ consisting of ‘N’ integers each. He wants to divide these two arrays into two parts each, such that the sum of all the elements in the first part is equal to the sum of elements in the second part, and the index ‘k’ where the splitting is done, must be the same in both the arrays.

In simple terms, If he splits the array at index k, then (A[0]+A[1]....A[k]), (A[k + 1] + A[k + 2]....A[n - 1]), (B[0] + B[1]....B[k]), (B[k + 1] + B[k + 2]....B[n - 1]) are all equal.

Find the total number of all the Indexes which satisfy the given condition.

For Example :
n = 4, A = {2, 4, 5, 1}, B = {3, 3, 10, -4}

Now in this example, if we split the array at index 1 then the sum of all the subarrays is 2 + 4 = 6, 5 + 1 = 6, 3 + 3 = 6, 10 + (-4) = 6, and no other index satisfies this condition, hence the answer is 1.
Try solving now
02
Round
Easy
Video Call
Duration60 minutes
Interview date3 Feb 2022
Coding problem3

The round was a technical interview with an SDE-2 who was working at Deloitte. It was an on-call interview on zoom.
The interviewer was warm and welcoming. We started off with our introduction and then some basics of CS and OS. 

Around 25 minutes were spent in discussing my resume and cross-questioning on my projects.

1. Cycle Detection in a Singly Linked List

Moderate
15m average time
80% success
0/80
Asked in companies
Morgan StanleyDunzoOYO

You are given a Singly Linked List of integers. Return true if it has a cycle, else return false.


A cycle occurs when a node's next points back to a previous node in the list.


Example:
In the given linked list, there is a cycle, hence we return true.

Sample Example 1

Problem approach

I first started off by explaining the question, and cross-questioning if there are any constraints. Explained my approach.
Used slow and fast pointer approach. Walked him through my code. Also did a dry run on an example test case. Interviewer was satisfied.

Try solving now

2. SQL Question

Write a query to find 3 employees with the lowest salary in the database.

Problem approach

Tip 1 : Practise SQL queries if SQL is mentioned in your resume
Tip 2 : Write clean queries.

3. Two Sum

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

You are given an array of integers 'ARR' of length 'N' and an integer Target. Your task is to return all pairs of elements such that they add up to Target.

Note:

We cannot use the element at a given index twice.

Follow Up:

Try to do this problem in O(N) time complexity. 
Problem approach

1. First sorted the array and then iterated it. 
2. interviewer asked me to optimise my solution
3. I used a sliding pointer and did it in 1 iteration.
4. He gave a constraint that the array is already sorted. and asked me to solve it in O(n).
5. I used sliding window to solve the question.
6. Did a dry run of the code and explained how the code also covers the edge cases.

Try solving now
03
Round
Medium
Video Call
Duration60 minutes
Interview date6 Aug 2022
Coding problem3

The interviewer was SDE-2. He was friendly and gave hints wherever I got stuck. Started off with our introduction and then proceeded to check our basic C++ knowledge. 
The time was around 6 PM.

1. Nth Fibonacci Number

Easy
0/40
Asked in companies
SAP LabsHCL TechnologiesWalmart

The n-th term of Fibonacci series F(n), where F(n) is a function, is calculated using the following formula -

    F(n) = F(n - 1) + F(n - 2), 
    Where, F(1) = 1, F(2) = 1


Provided 'n' you have to find out the n-th Fibonacci Number. Handle edges cases like when 'n' = 1 or 'n' = 2 by using conditionals like if else and return what's expected.

"Indexing is start from 1"


Example :
Input: 6

Output: 8

Explanation: The number is ‘6’ so we have to find the “6th” Fibonacci number.
So by using the given formula of the Fibonacci series, we get the series:    
[ 1, 1, 2, 3, 5, 8, 13, 21]
So the “6th” element is “8” hence we get the output.
Problem approach

Used a simple recursive approach to solve the problem. Was stuck but the interviewer helped me and gave me hints.

Try solving now

2. Coin Change

Hard
0/120
Asked in companies
IBMAdobeAmazon

You are given an array of integers ‘coins’ denoting the denomination of coins and another array of integers ‘freq’ denoting the number of coins of each denomination.

You have to find the number of ways to make the sum ‘V’ by selecting some(or all) coins from the array.

The answer can be very large. So, return the answer modulo 1000000007.

For Example :
‘N’ = 3, ‘coins’ = {1, 2, 3}, ‘freq’ = {1, 1, 3}, ‘V’ = 6

For the given example, we can make six by using the following coins:
{1, 2, 3}
{3. 3}
Hence, the answer is 2.
Problem approach

1. I sorted the array and then started off from the back.
2. was not able to cover the edge cases.
3. I Used recursion and DP to optimise my approach.
4. He asked me to further bring down the TC. So eliminated the need to solve the overlapping subproblems by using an array to store the result of all the subproblems.

Try solving now

3. System Design Question

Design Instagram database.

Problem approach

Tip 1 : Ask questions from the interviewer. 
Tip 2 : Start off by gathering all the functional requirements.
Tip 3 : Prepare a rough strategy on pen and paper.
Tip 4 : Keep discussing with the interviewer what comes to your mind, Keep him engaged.
Tip 4 : Establish correct relationship between tables when it comes to database design.

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