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

SDE - Intern

Samsung
upvote
share-icon
3 rounds | 5 Coding problems

Interview preparation journey

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

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

Application process
Where: Campus
Eligibility: Above 7 CGPA
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 Interview
Duration70 minutes
Interview date1 Dec 2018
Coding problem2

The round was of 70 min duration and consist of 3 coding problems on the Cocubes Platform. There were many sets of problems and most of the people get different problems.

1. Missing number in Arithmetic progression

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

You are given a sorted array of ‘N’ distinct integers that are in the Arithmetic Progression sequence except for one element which is missing from the sequence. You have to find that missing number from the given sequence.

Note:
1. A sequence [arr0, arr1,…, arr(n-1)] is called an Arithmetic progression if for each 'i' ( 0 ≤ i < n - 1) the value arr[i+1] − arr[i] is the same. 
2. There is exactly one missing number in the given sequence.
3. All the numbers present in the sequence are distinct.
4. It is the guarantee that the first and last elements of the sequence are not missing elements.
Follow Up
The overall run time complexity should be O(log(N)).
Problem approach

The idea is to go to the middle element. Check if the difference between middle and next to middle is equal to diff or not, if not then the missing element lies between mid and mid+1. If the middle element is equal to n/2th term in Arithmetic Series (Let n be the number of elements in input array), then missing element lies in right half. Else element lies in left half.

Try solving now

2. Top View Of Binary Tree

Moderate
25m average time
70% success
0/80
Asked in companies
MicrosoftMakeMyTripOYO

You are given a Binary Tree of 'n' nodes.


The Top view of the binary tree is the set of nodes visible when we see the tree from the top.


Find the top view of the given binary tree, from left to right.


Example :
Input: Let the binary tree be:

Example

Output: [10, 4, 2, 1, 3, 6]

Explanation: Consider the vertical lines in the figure. The top view contains the topmost node from each vertical line.
Problem approach

The idea is to do something similar to vertical Order Traversal.

Try solving now
02
Round
Easy
Video Call
Duration60 minutes
Interview date3 Dec 2018
Coding problem2

This round was held on skype, the interviewer was of a very friendly nature, he started with introducing himself and without my introduction. He asked me about my strong point, I mentioned Competitive Programming and DSA.
Detecting cycle in a directed graph
Detecting cycle in an undirected graph
Opps:
Inheritance
Polymorphism
Virtual Function
OS:
Deadlock
Paging
Segmentation
Semaphore

1. Detect Cycle in a Directed Graph

Moderate
25m average time
65% success
0/80
Asked in companies
AmazonAmerican ExpressOYO

Given a directed graph, check whether the graph contains a cycle or not. Your function should return true if the given graph contains at least one cycle, else return false.

Problem approach

Depth First Traversal can be used to detect a cycle in a Graph

Try solving now

2. Cycle Detection In Undirected Graph

Moderate
0/80
Asked in companies
AmazonAdobeSamsung

You have been given an undirected graph with 'N' vertices and 'M' edges. The vertices are labelled from 1 to 'N'.

Your task is to find if the graph contains a cycle or not.

A path that starts from a given vertex and ends at the same vertex traversing the edges only once is called a cycle.

Example :

In the below graph, there exists a cycle between vertex 1, 2 and 3. 

Example

Note:

1. There are no parallel edges between two vertices.

2. There are no self-loops(an edge connecting the vertex to itself) in the graph.

3. The graph can be disconnected.

For Example :

Input: N = 3 , Edges =  [[1, 2], [2, 3], [1, 3]].
Output: Yes

Explanation : There are a total of 3 vertices in the graph. There is an edge between vertex 1 and 2, vertex 2 and 3 and vertex 1 and 3. So, there exists a cycle in the graph. 
Problem approach

To detect if there is any cycle in the undirected graph or not, we will use the DFS traversal for the given graph. For every visited vertex v, when we have found any adjacent vertex u, such that u is already visited, and u is not the parent of vertex v. Then one cycle is detected.

Try solving now
03
Round
Medium
Video Call
Duration60 minutes
Interview date5 Dec 2018
Coding problem1

This round was also held on skype. The interview was very friendly, starting with his introduction, and asked from where I am, he moved to the first problem :

Minimum cost to reach bottom-right corner starting from top-left of a matrix, where every cell represents a cost to cover that one

Given a string, it consists of only two types of characters 1 and 2 . Make a new string by replacing every 1 by 11 and two consecutive two to only single

1. Minimum Cost Path

Moderate
25m average time
70% success
0/80
Asked in companies
Goldman SachsOlaSalesforce

You have been given a matrix of ‘N’ rows and ‘M’ columns filled up with integers. Find the minimum sum that can be obtained from a path which from cell (x,y) and ends at the top left corner (1,1).

From any cell in a row, we can move to the right, down or the down right diagonal cell. So from a particular cell (row, col), we can move to the following three cells:

Down: (row+1,col)
Right: (row, col+1)
Down right diagonal: (row+1, col+1)
Problem approach

The idea is to use recursion.

Try solving now

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 - Intern
3 rounds | 4 problems
Interviewed by Samsung
1351 views
0 comments
0 upvotes
company logo
SDE - Intern
2 rounds | 4 problems
Interviewed by Samsung
918 views
0 comments
0 upvotes
company logo
SDE - Intern
2 rounds | 8 problems
Interviewed by Samsung
1056 views
0 comments
0 upvotes
company logo
SDE - Intern
3 rounds | 5 problems
Interviewed by Samsung
1616 views
1 comments
0 upvotes
Companies with similar interview experiences
company logo
SDE - Intern
3 rounds | 6 problems
Interviewed by Amazon
15605 views
4 comments
0 upvotes
company logo
SDE - Intern
4 rounds | 7 problems
Interviewed by Microsoft
15499 views
1 comments
0 upvotes
company logo
SDE - Intern
2 rounds | 4 problems
Interviewed by Amazon
10216 views
2 comments
0 upvotes