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

SDE - 1

HashedIn
upvote
share-icon
5 rounds | 12 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 2.5 Months
Topics: Data Structures and Algorithms, OS, DBMS, Networks, Low level design
Tip
Tip

Tip 1 : Make your Data Structures and Algorithms very strong
Tip 2 : They mostly ask from topics like arrays,linked list,Hash Maps, String
Tip 3 : Sometimes they ask easy and frequently asked DP ques

Application process
Where: Referral
Eligibility: No criteria
Resume Tip
Resume tip

Tip 1 : You have knowledge of the things you write on resume
Tip 2 : It is not important to have projects but if you have written, you should have idea about it.

Interview rounds

01
Round
Easy
Online Coding Interview
Duration90 minutes
Interview date23 Nov 2019
Coding problem3

Timing:- It was on morning at around 9.
Everyone had to bring their own laptop.
Interviewers were very helpful. They gave hints during the interview. You should catch it and try to proceed in that direction

1. Factorial of a Number

Moderate
25m average time
70% success
0/80
Asked in companies
HCL TechnologiesHCL TechnologiesWells Fargo

You are given an integer ‘N’. You have to print the value of Factorial of ‘N’. The Factorial of a number ‘N’ is defined as the product of all numbers from 1 to ‘N’.

For Example:
Consider if ‘N’ = 4, the Factorial of 4 will be the product of all numbers from 1 to 4, which is 1 * 2 * 3 * 4 = 24. Hence, the answer is 24.
Problem approach

Solving the problem is most important. It can be brute force solution.
I used for loop to solve the problem.

Try solving now

2. Nth Number

Hard
50m average time
40% success
0/120
Asked in companies
MicrosoftHashedInLowe's India

In a series of numbers where each number is such that the sum of its digits equals 10. Given an integer value 'N', your task is to find the N-th positive integer whose sum of digits equals to 10.

Problem approach

I used for loop to solve the problem.

Try solving now

3. Find All Anagrams in a String

Easy
15m average time
85% success
0/40
Asked in companies
American ExpressThought WorksWalmart

You have been given a string STR and a non-empty string PTR. Your task is to find all the starting indices of PTR’s anagram in STR.

An anagram of a string is another string which contains the same characters and is obtained by rearranging the characters.

For example: ‘SILENT’ and ‘LISTEN’ are anagrams of each other. ‘ABA’ and ‘ABB’ are not anagram because we can’t convert ‘ABA’ to ‘ABB’ by rearranging the characters of particular strings.

Note:

1. Both STR and PTR consist of English uppercase letters.
2. Length of string 'STR' will always be greater than or equal to the length of string ‘PTR’.
3. In case, there is no anagram substring, then return an empty sequence.
4. In case of more than one anagrams, return the indices in increasing order.
Problem approach

I used for loop to solve the problem.

Try solving now
02
Round
Medium
Coding Test - Pen and paper
Duration45 Minutes
Interview date23 Nov 2019
Coding problem2

It was the same day as round 1 at around 12.

1. Minimum Number of Platforms

Moderate
30m average time
70% success
0/80
Asked in companies
MeeshoGrabAmazon

You have been given two arrays, 'AT' and 'DT', representing the arrival and departure times of all trains that reach a railway station.

Your task is to find the minimum number of platforms required for the railway station so that no train needs to wait.

Note :
1. Every train will depart on the same day and the departure time will always be greater than the arrival time. For example, A train with arrival time 2240 and departure time 1930 is not possible.

2. Time will be given in 24H format and colons will be omitted for convenience. For example, 9:05AM will be given as "905", or 9:10PM will be given as "2110".

3. Also, there will be no leading zeroes in the given times. For example, 12:10AM will be given as “10” and not as “0010”.
Problem approach

Use Greedy approach to solve the problem

Try solving now

2. Pythagorean Triplets

Moderate
35m average time
70% success
0/80
Asked in companies
AmazonOYOErnst & Young (EY)

You are given an array of n integers (a1, a2,....,an), you need to find if the array contains a pythagorean triplet or not.

An array is said to have a pythagorean triplet if there exists three integers x,y and z in the array such that x^2 + y^2 = z^2.

Note
1. The integers x,y and z might not be distinct , but they should be present at different locations in the array i.e if a[i] = x, a[j] = y and a[k] = z, then i,j and k should be pairwise distinct.
2. The integers a,b and c can be present in any order in the given array.
Problem approach

Used the logic of pythagoras theorem, and hashmap

Try solving now
03
Round
Medium
Face to Face
Duration45 Minutes
Interview date23 Nov 2019
Coding problem4

It was in afternoon at around 2 or 3. The interviewers were very helpful and calm.

Firstly the took my introduction then as I told them I like java so they asked some basic questions in java like who is the parent class of all the classes. Name some of the functions of that class .which package is imported by default. Name some functions included in it. Then they were going to ask about my project which included python and some machine learning concepts. I told that I know only the basics of python and ml ,I was not much comfortable in it. So they only asked about the name of model used in it.

1. Intersection of Two Linked Lists

Easy
25m average time
73% success
0/40
Asked in companies
OracleThought WorksIBM

You are given two Singly Linked Lists of integers, which may have an intersection point.

Your task is to return the first intersection node. If there is no intersection, return NULL.


Example:-
The Linked Lists, where a1, a2, c1, c2, c3 is the first linked list and b1, b2, b3, c1, c2, c3 is the second linked list, merging at node c1.

alt.txt

Problem approach

Claculate the length of both the linked list, then find the difference of it and travel upto the difference in larger linked list. then start traversing both the linked list, you will get the intersection point.

Try solving now

2. Best Time to Buy and Sell Stock

Moderate
20m average time
80% success
0/80
Asked in companies
IntuitOptumOYO

You are given an array/list 'prices' where the elements of the array represent the prices of the stock as they were yesterday and indices of the array represent minutes. Your task is to find and return the maximum profit you can make by buying and selling the stock. You can buy and sell the stock only once.

Note:

You can’t sell without buying first.
For Example:
For the given array [ 2, 100, 150, 120],
The maximum profit can be achieved by buying the stock at minute 0 when its price is Rs. 2 and selling it at minute 2 when its price is Rs. 150.
So, the output will be 148.
Problem approach

(It was a dp ques I tried but i was not able to crack it. I tried for some time and then they asked me if I wanted for the ques to be changed and I agreed.

Try solving now

3. Reverse Only Letters

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

You are given a string, ‘S’. You need to reverse the string where characters that are not an alphabet stay in the same place, and the rest reverse their positions.

Eg: “a-bcd” becomes “d-cba”

Problem approach

Use two pointers approach

Try solving now

4. Technical Question

class temp{......
int sum(int a,int b){}
String sum(int a,int b){...}
}
class main{
Psvm(...){
Object of temp was made
Int ans=object.sum(5,6)
String s=object.sum(5,6)
}
}
Which function will go to which method? What is the name of this process(overriding)

Problem approach

See the class and think logically to solve

04
Round
Hard
Face to Face
Duration45 Minutes
Interview date23 Nov 2019
Coding problem2

It was in the evening. The interviewers were very good.

1. Valid Sudoku

Moderate
40m average time
60% success
0/80
Asked in companies
QualcommUberDirecti

You have been given a 9 X 9 2D matrix 'MATRIX' with some cells filled with digits(1 - 9), and some empty cells (denoted by 0).

You need to find whether there exists a way to fill all the empty cells with some digit(1 - 9) such that the final matrix is a valid Sudoku solution.

A Sudoku solution must satisfy all the following conditions-

1. Each of the digits 1 - 9 must occur exactly once in each row.
2. Each of the digits 1 - 9 must occur exactly once in each column.
3. Each of the digits 1 - 9 must occur exactly once in each of the 9, 3 x 3 sub-matrices of the matrix.
Note
1. There will always be a cell in the matrix which is empty.
2. The given initial matrix will always be consistent according to the rules mentioned in the problem statement.
Try solving now

2. Unequal Adjacent Elements

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

You have been given an array/list ‘ARR’ of integers consisting of ‘N' integers. You need to rearrange ‘ARR’ so that no two adjacent elements are equal. You may return any valid rearrangement and it is guaranteed the answer exists.

Example :
Let’s say you have an array/list ‘ARR = [1,1,2,2]’. 

Then a valid rearrangement can be [1,2,1,2] or [2,1,2,1] such that no two adjacent elements are equal. [2,1,1,2] is an invalid arrangement because two adjacent elements are equal.
Try solving now
05
Round
Easy
HR Round
Duration30 Minutes
Interview date23 Nov 2019
Coding problem1

It was in the evening at around 6pm

1. Basic HR Questions

It was normal asked about my hobbies and told about hashedin university.

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