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

SDE - 2

Samsung
upvote
share-icon
3 rounds | 4 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 6 months
Topics: Data Structures, Pointers, OOPS, System Design, Algorithms, Dynamic Programming, java
Tip
Tip

Tip 1 - Practice Atleast 250 Questions from geeks from geeks and coding ninjas
Tip 2 - Ex- Do atleast 2 good projects

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

Tip 1 : Have some projects on resume.
Tip 2 : Do not put false things on resume and be confident.

Interview rounds

01
Round
Easy
Online Coding Test
Duration60 minutes
Interview date20 May 2022
Coding problem2

2 coding questions

1. Circular Tour

Easy
35m average time
85% success
0/40
Asked in companies
AdobeMicrosoftExpedia Group

You have been given a circular path. There are N petrol pumps on this path that are numbered from 0 to N - 1 (Both inclusive). Each petrol pump has two values associated with it:

1)The amount of petrol that is available at this particular petrol pump.

2)The distance to reach the next petrol pump.

You are on a truck having an empty tank of infinite capacity. You can start the tour from any of the petrol pumps. Your task is to calculate the first petrol pump from where the truck will be able to complete the full circle or determine if it is impossible to do so.

You may assume that the truck will stop at every petrol pump and it will add the petrol from that pump to its tank. The truck will move one kilometre for each litre of petrol consumed.

Problem approach

Approach is to store the value of the capacity in some variable whenever the capacity becomes less than zero.

In this case You have to traverse the array only once as compared to previous method which traverses the each index twice.

Try solving now

2. Remove BST keys outside the given range

Easy
15m average time
85% success
0/40
Asked in companies
PhonePePayPalSamsung R&D Institute

Given a Binary Search Tree (BST) and a range [min, max], remove all keys which are outside the given range. The modified tree should also be BST.

Problem approach

Traverse the tree in the inorder traversal. If the Binary search tree is traversed in inorder traversal the keys are traversed in increasing order. So while traversing the keys in the inorder traversal. If the key lies in the range print the key else skip the key.

Try solving now
02
Round
Medium
Face to Face
Duration60 minutes
Interview date21 May 2022
Coding problem1

He first asked me the technologies I have worked on and then quickly moved on to the questions.Given a reference to a node in a doubly-linked list, delete the node. I just told him the simple solution to it with the corner cases covered.

1. Next Greater Element

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

You are given an array arr of length N. You have to return a list of integers containing the NGE(next greater element) of each element of the given array. The NGE for an element X is the first greater element on the right side of X in the array. Elements for which no greater element exists, consider the NGE as -1.

For Example :

If the given array is [1, 3, 2], then you need to return [3, -1, -1]. Because for 1, 3 is the next greater element, for 3 it does not have any greater number to its right, and similarly for 2.
Problem approach

A tricky method is to replace all elements using one traversal of the array. The idea is to start from the rightmost element, move to the left side one by one, and keep track of the maximum element. Replace every element with the maximum element.

Try solving now
03
Round
Easy
HR Round
Duration20 minutes
Interview date31 May 2022
Coding problem1

He asked me some typical questions like why I am looking for a new job, what do you expect from this job and a few more.

He then told me that he is offering me the job and wants me to join ASAP for which he was ready to buy out from my current company.

1. Basic HR Questions

He asked me some typical questions like why I am looking for a new job, what do you expect from this job and a few more.

He then told me that he is offering me the job and wants me to join ASAP for which he was ready to buy out from my current company.

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 - 2
3 rounds | 4 problems
Interviewed by Samsung
2588 views
0 comments
0 upvotes
company logo
SDE - 2
4 rounds | 8 problems
Interviewed by Samsung
1300 views
0 comments
0 upvotes
company logo
SDE - 2
4 rounds | 7 problems
Interviewed by Samsung
1830 views
0 comments
0 upvotes
company logo
SDE - 2
4 rounds | 7 problems
Interviewed by Samsung
2085 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
SDE - 2
5 rounds | 12 problems
Interviewed by Walmart
29892 views
8 comments
0 upvotes
company logo
SDE - 2
3 rounds | 5 problems
Interviewed by Amazon
6766 views
1 comments
0 upvotes
company logo
SDE - 2
6 rounds | 8 problems
Interviewed by Amazon
5281 views
0 comments
0 upvotes