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

SDE - 1

Samsung Electronics
upvote
share-icon
3 rounds | 6 Coding problems

Interview preparation journey

expand-icon
Journey
I started my coding journey in my second year of graduation. I asked and consulted seniors on how to start my coding journey. I started with DSA first. I was not consistent initially, but in my seventh semester, I started practicing DSA on a regular basis. I maintained a streak of 10-15 questions daily. In my last semester, I learned web development and did some projects as well that helped me enhance my resume. Finally, I was ready to apply to different companies for placements.
Application story
This company visited our campus for placement. It first did the shortlisting based on resume and CGPA. After that, an online assessment was conducted, and on that basis, 20 candidates were shortlisted for further rounds.
Why selected/rejected for the role?
I gave correct and optimised solutions for almost all the questions that were asked in the coding rounds. I also built the optimal solution starting from the brute force algorithm which also added to my points. Communication is the key to selection.
Preparation
Duration: 4 months
Topics: Data Structures, JAVA, OOPS, System Design, Algorithms, Dynamic Programming
Tip
Tip

Tip 1 - Practice at least 250 Questions from coding ninjas
Tip 2 - Do at least 2 good projects

Application process
Where: Campus
Eligibility: 7.5
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
Medium
Online Coding Test
Duration70 mins
Interview date18 Oct 2019
Coding problem2

Two coding questions were asked

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
MicrosoftThought WorksSamsung R&D Institute

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

I solved using vertical order traversal

Try solving now
02
Round
Easy
Video Call
Duration60 mins
Interview date19 Oct 2019
Coding problem2

1. Detect Cycle In A Directed Graph

Moderate
30m average time
75% success
0/80
Asked in companies
MicrosoftAdobeFlipkart

You are given a directed graph having ‘N’ nodes. A matrix ‘EDGES’ of size M x 2 is given which represents the ‘M’ edges such that there is an edge directed from node EDGES[i][0] to node EDGES[i][1].

Find whether the graph contains a cycle or not, return true if a cycle is present in the given directed graph else return false.

For Example :
In the following directed graph has a cycle i.e. B->C->E->D->B.

alt text

Note :
1. The cycle must contain at least two nodes.
2. It is guaranteed that the given graph has no self-loops in the graph.
3. The graph may or may not be connected.
4. Nodes are numbered from 1 to N.
5. Your solution will run on multiple test cases. If you are using global variables make sure to clear them.
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
FlipkartAmazonAdobe

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
Easy
Video Call
Duration60 mins
Interview date19 Oct 2019
Coding problem2

1. Minimum Cost Path

Moderate
25m average time
70% success
0/80
Asked in companies
OptumCIS - Cyber InfrastructureUrban Company (UrbanClap)

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

Use recursion to solve this problem

Try solving now

2. Puzzle

There are 25 horses among which you need to find out the fastest 3 horses. You can conduct race among at most 5 to find out their relative speed. At no point you can find out the actual speed of the horse in a race. Find out the minimum no. of races which are required to get the top 3 horses.

Problem approach

First, we group the horses into groups of 5 and race each group on the race course. This gives us 5 races.

Here's your problem of the day

Solving this problem will increase your chance to get selected in this company

Skill covered: Programming

What does the SQL function NOW() return?

Choose another skill to practice
Similar interview experiences
SDE - 1
3 rounds | 4 problems
Interviewed by Samsung Electronics
672 views
0 comments
0 upvotes
SDE - 1
4 rounds | 4 problems
Interviewed by Samsung Electronics
906 views
0 comments
0 upvotes
Software Engineer
3 rounds | 6 problems
Interviewed by Samsung Electronics
633 views
0 comments
0 upvotes
SDE - 1
4 rounds | 7 problems
Interviewed by Samsung Electronics
875 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
SDE - 1
5 rounds | 12 problems
Interviewed by Amazon
110296 views
24 comments
0 upvotes
company logo
SDE - 1
4 rounds | 5 problems
Interviewed by Microsoft
54105 views
5 comments
0 upvotes
company logo
SDE - 1
3 rounds | 7 problems
Interviewed by Amazon
33181 views
6 comments
0 upvotes