DealShare.in interview experience Real time questions & tips from candidates to crack your interview

SDE - 1

DealShare.in
upvote
share-icon
3 rounds | 5 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 4 months
Topics: Data structures, Algorithms, OOPS, OS, DBMS, Computer Networks, System Design
Tip
Tip

Tip 1 : Make sure you have your computer science fundamentals very clear.
Tip 2 : You should know the complexity of the code you write and should know the internal implementation of the data structure you use while coding.
Tip 3 : You should know about everything you write in your resume.
Tip 4 : Practice a lot of programming problems. Participate in competitive programming contests.

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

Tip 1 : Be honest about what you write in your resume.
Tip 2 : Should have at least 2 projects
Tip 3 : Maintain a precise and self-speaking one-page resume.
Tip 4 : Add technical achievements only.

Interview rounds

01
Round
Easy
Online Coding Test
Duration60 minutes
Interview date13 Jan 2021
Coding problem2

This was a subjective coding round held on HackerEarth. It had 2 coding rounds that needed to be done in 60 minutes.

1. Minimum Difference

Moderate
20m average time
80% success
0/80
Asked in companies
AmazonSoft SuaveJupiter Money

Goku is fighting Jiren in “Tournament of Power”. If Goku loses then Universe 7 will get destroyed by Zeno but if Jiren loses then Universe 11 will get destroyed and Universe 7 will survive. Both Goku and Jiren launched ‘N’ attacks towards each other. Each attack has some energy. Jiren has a special ability through which he can absorb the attacks of Goku. If Goku launches an attack with energy ‘A’ and Jiren launches an attack with energy ‘B’ then

If ‘A’ > ‘B’, then Goku’s attack will destroy Jiren’s attack but Jiren will absorb Goku’s attack and absorb energy = ‘A’ – ‘B’.

If ‘A’ < ‘B’, then Jiren’s attack will destroy Goku’s attack and Jiren will absorb the remaining energy of his attack which is equal to = ‘B’ – ‘A’.

If ‘A’ == ‘B’, then both Goku’s and Jiren’s attack will get destroyed and Jiren will not absorb any energy.

Goku finds out the energy of all attacks of Jiren and the order in which Jiren is going to attack with the help of Whis. As Jiren becomes powerful by absorbing energy, Goku wants to minimize the total energy absorbed by Jiren by rearranging the order of his attacks.

As Goku is busy fighting with Jiren, he called you for help.

The fate of Universe 7 lies in your hand.

Try solving now

2. Split the String

Easy
0/40
Asked in companies
Morgan StanleyLinkedInAmazon

You are given a string ‘str’ of ‘N’ lowercase alphabets. Your task is to check whether it is possible to split the given string into three non-empty substrings such that one of them is a substring of another two.

For example:

‘str’ = 'abcabab', we can split this string into 3 string a, b, c as a = 'abc', b = 'ab',  c = 'abc', we can clearly see that b is a substring of both a and c.

Note:

A substring is a contiguous sequence of characters within a string. For example 'ab', 'b' and 'abc' are the substring of string 'abc', but 'ac' is not a substring of 'abc'. 

A non-empty substring means a substring with a size greater than 0.
Problem approach

We first count each character (r[ch]), and number of distinct characters (d_r). These are initial numbers for our right substring (thus, indicated as r).

As we move our split point from left to right, we "move" the current character to the left substring, and update count and distinct characters in left and right substrings.

If the number of distict characters is equal, we increment the result.

Try solving now
02
Round
Easy
Video Call
Duration60 minutes
Interview date21 Jan 2021
Coding problem2

This round was taken by a senior engineer. He asked about my past work followed by 2 DSA questions.

1. Ninja and his Dominos

Moderate
0/80
Asked in companies
Google incDealShare.in

Ninja has ‘N’ dominos. He puts all of these dominos in a straight line. Each domino has two values on it, top value and bottom value. You are given two arrays ‘top’ and ‘bottom’ where ‘top[i]’ denotes the top value at the ‘i’th domino and ‘bottom[i]’ denotes the bottom value of the ‘i’th domino. ‘top[i]’ and ‘bottom[i]’ are independent of each other.

Ninja wants to arrange these dominos such that either the top part or the bottom part of all the dominos is the same, but he can do only one operation: i.e., Rotate the ‘i’th domino such that ‘top[i]’ now becomes ‘bottom[i]’ and ‘bottom[i]’ becomes ‘top[i]’.

Help Ninja find the minimum number of operations required.

If he cannot do so, print -1.

For Example :
‘N’ = 4, ‘top’ = {3, 5, 3, 1}, ‘bottom’ = {2, 3, 5, 3}.

Now in this example, if Ninja rotates the second and the fourth dominos, the top row will be {3, 3, 3, 3}. Hence the answer is 2.
Problem approach

if A[0] works, no need to check B[0].
Because if both A[0] and B[0] exist in all dominoes,
when you swap A[0] in a whole row,
you will swap B[0] in a whole at the same time.
The result of trying A[0] and B[0] will be the same.

Try solving now

2. Kth Smallest and Largest Element of Array

Easy
15m average time
70% success
0/40
Asked in companies
HSBCSalesforceSprinklr

You are given an array ‘Arr’ consisting of ‘N’ distinct integers and a positive integer ‘K’. Find out Kth smallest and Kth largest element of the array. It is guaranteed that K is not greater than the size of the array.

Example:

Let ‘N’ = 4,  ‘Arr’ be [1, 2, 5, 4] and ‘K’ = 3.  
then the elements of this array in ascending order is [1, 2, 4, 5].  Clearly, the 3rd smallest and largest element of this array is 4 and 2 respectively.
Problem approach

Build a Max-Heap MH of the first K elements (arr[0] to arr[K-1]) of the given array. 
For each element, after the Kth element (arr[K] to arr[n-1]), compare it with the root of MH. 
If the element is less than the root then make it the root and call heapify for Max-Heap MH
b) Else ignore it. 
Finally, the root of the MH is the Kth smallest element.

Try solving now
03
Round
Easy
Video Call
Duration30 minutes
Interview date26 Jan 2021
Coding problem1

This round was an hiring manager round held for 30 minutes. he quickly asked about previous company project followed by a system design question

1. System Design Question

Design an API Rate Limiter.

Problem approach

Tip 1 : Practice previously asked questions.
Tip 2 : Share the process with the interviewer.
Tip 3 : Clear the requirements from interviewer if required

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
2 rounds | 3 problems
Interviewed by DealShare.in
1859 views
0 comments
0 upvotes
company logo
SDE - 1
2 rounds | 4 problems
Interviewed by DealShare.in
1305 views
0 comments
0 upvotes
company logo
SDE - 1
4 rounds | 8 problems
Interviewed by Amazon
8962 views
0 comments
0 upvotes
company logo
SDE - Intern
1 rounds | 3 problems
Interviewed by Amazon
3501 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
SDE - 1
5 rounds | 12 problems
Interviewed by Amazon
115097 views
24 comments
0 upvotes
company logo
SDE - 1
4 rounds | 5 problems
Interviewed by Microsoft
58237 views
5 comments
0 upvotes
company logo
SDE - 1
3 rounds | 7 problems
Interviewed by Amazon
35147 views
7 comments
0 upvotes