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

SDE - 1

HashedIn
upvote
share-icon
4 rounds | 11 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 6 Months
Topics: Data Structures, Algorithms, Low Level Design, SQL, Operating System, Database Management System
Tip
Tip

Tip 1 : Give contest as much you can, this will boost your confidence
Tip 2 : Do at least 3 projects, in order of low, medium and high difficulty, most questions will be asked from top 2.
Tip 3 : Do what works for you, don't look for ideal cases

Application process
Where: Campus
Eligibility: Above 7 CGPA
Resume Tip
Resume tip

Tip 1 : 3 Projects must be there, in order of low, medium and high. Frontend, Backend and Full Stack project creates great impact
Tip 2 : Must be clean, don't make fancy resume, HackerResume is a great choice for Resume.

Interview rounds

01
Round
Medium
Online Coding Test
Duration60 minutes
Interview date26 Oct 2021
Coding problem3

1. Longest Bitonic Sequence

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

A Bitonic Sequence is a sequence of numbers that is first strictly increasing and then strictly decreasing.


A strictly ascending order sequence is also considered bitonic, with the decreasing part as empty, and same for a strictly descending order sequence.


For example, the sequences [1, 3, 5, 3, 2], [1, 2, 3, 4] are bitonic, whereas the sequences [5, 4, 1, 4, 5] and [1, 2, 2, 3] are not.


You are given an array 'arr' consisting of 'n' positive integers.


Find the length of the longest bitonic subsequence of 'arr'.


Example :
Input: 'arr' = [1, 2, 1, 2, 1]

Output: 3

Explanation: The longest bitonic subsequence for this array will be [1, 2, 1]. Please note that [1, 2, 2, 1] is not a valid bitonic subsequence, because the consecutive 2's are neither strictly increasing, nor strictly decreasing.
Try solving now

2. XOR Pairs

Easy
0/40
Asked in company
HashedIn

You are given an array ‘A’ of size ‘N’. Return true if an array can be divided into groups of pairs such that XOR of each pair is equal to 0.

A pair consists of two integers.

Example : Let the array be { 1, 2, 3, 4}

One of the ways to divide it into groups of pairs is { 1, 2 } and { 3, 4}.

Try solving now

3. Kth Smallest Natural Number After Removing Some Numbers

Moderate
0/80
Asked in companies
Urban Company (UrbanClap)HashedIn

You have a list of all-natural numbers and an ‘arr’. Your task is to find the Kth smallest natural number after removing all numbers in ‘arr’ from the list of all-natural numbers.

Note: ‘arr’ will be sorted in ascending order.

For example:
You are given, ‘arr’ = [1, 2, 4], ‘K’ = ‘5’, You have the natural numbers as [1, 2, 3, 4, 5, 6, 7 .. ], after removing all the integers in the array from natural numbers, we have, [3, 5, 6, 7, 8]. Here 8 is the 5th smallest number. Hence the answer is 8.
Try solving now
02
Round
Medium
Video Call
Duration60 minutes
Interview date27 Oct 2021
Coding problem2

1. Minimum Character Deletion

Moderate
15m average time
80% success
0/80
Asked in companies
American ExpressDeutsche BankMeesho

You are given a string ‘STR’. You need to find and return the minimum number of characters to be deleted from ‘STR’ so that the frequency of each character in the string becomes unique.

Example:
If the given string is “aaBBccc” then the frequency of characters: { a:2, B:2, c:3 }. Now, as ‘a’ and ‘B’ both have the same frequency 2, we need to delete one character either one ‘a’ or one ‘B’, to make their frequency different. After deleting any character we will get frequency as 1,2 and 3, as they all are different. Thus we got our solution as 1.
Problem approach

As we are only allowed to delete the character, thus the resulting string after deletion of some character would be the subsequence of the string. So, we have to find such a subsequence which has the unique frequency of each character. 

 

Initialise a variable ‘ans’ that will store the minimum number of characters that are needed to remove from the string. Create all the subsequences of the string and check whether it satisfies the condition, simultaneously update the ‘ans’ with the minimum of ‘ans’ and ('N' - length of subsequence). Finally, return the ‘ans’.

Try solving now

2. Minimum Jumps

Moderate
25m average time
75% success
0/80
Asked in companies
DirectiMakeMyTripOYO

Bob lives with his wife in a city named Berland. Bob is a good husband, so he goes out with his wife every Friday to ‘Arcade’ mall.

‘Arcade’ is a very famous mall in Berland. It has a very unique transportation method between shops. Since the shops in the mall are laying in a straight line, you can jump on a very advanced trampoline from the shop i, and land in any shop between (i) to (i + Arr[i]), where Arr[i] is a constant given for each shop.

There are N shops in the mall, numbered from 0 to N-1. Bob's wife starts her shopping journey from shop 0 and ends it in shop N-1. As the mall is very crowded on Fridays, unfortunately, Bob gets lost from his wife. So he wants to know, what is the minimum number of trampoline jumps from shop 0 he has to make in order to reach shop N-1 and see his wife again. If it is impossible to reach the last shop, return -1.

Problem approach

This is the most famous problem, This is Dynamic Programming problem, I tried all the possibilities and taking the minimum to it, 1D array is used for caching the results.

Try solving now
03
Round
Medium
Video Call
Duration50 minutes
Interview date28 May 2022
Coding problem5

1. System Design Questions

How would you go about Designing Instagram?

What would your DB Scheme look like?
What would your query look like for fetching all recent photos of the given user?
How would you write the query for fetching all photos, for a user feed?

Problem approach

Tip 1 : Watch some videos on Youtube and Practise SQL
Tip 2 : It's a Database Design, check previous Interview Experience and prepare accordingly
Tip 3 : Do checkout the System Design Guided Vertical on Coding Ninjas. It's very helpful while preparing for interviews.

2. Puzzle

How would you go about solving Rubik’s Cube? (Only Approach)

Solve for steps needed to reach the solved state of the cube
Data Structure you will use
Algorithmic Paradigm
Time Complexity

Problem approach

Tip 1 : Most problems can be solved using Graph, so you can say Graph
Tip 2 : You have to try all combinations, so it's a factorial thing
Tip 3 : Brute force, means Recursive Paradigms

3. 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.
Try solving now

4. OOPS Questions

1) Explain Garbage Collection in Java, which algorithm is used for Garbage Collection?
2) Explain Function Programming in Java? Does it support higher-order functions?
3) What are Singleton Objects?
4) What do you understand by Composition in OOPS?
5) What is Aggregation in OOPS?
 

Problem approach

Tip 1 : Read Interview Questions, you can follow sites like CodeStudio and LeetCode for this
Tip 2 : They will ask for language preference, so prepare well your Programming Language

5. Java Questions

1) How would you go about building API’s in Java?
2) What is JVM?

Problem approach

Tip 1 : Read Interview Questions, you can follow sites like CodeStudio and LeetCode for this
Tip 2 : Prepare Java well

04
Round
Easy
HR Round
Duration30 minutes
Interview date28 May 2022
Coding problem1

This is a cultural fitment testing round. HR was very frank and asked standard questions.

1. Basic HR Question

Tell me something not there in your resume.

Problem approach

If you get this question, it's an opportunity to choose the most compelling information to share that is not obvious from your resume.


Example :


Strength -> I believe that my greatest strength is the ability to solve problems quickly and efficiently, which makes me unique from others.
 

Ability to handle Pressure -> I enjoy working under pressure because I believe it helps me grow and become more efficient.


Tip : Emphasize why you were inspired to apply for the job. You can also explain that you are willing to invest in a great deal of energy if hired. These are generally very open-ended questions and are asked to test how quick wit a candidate is. So there is nothing to worry about if you have a good command over your communication skills and you are able to propagate your thoughts well to the interviewer.

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