Code360 powered by Coding Ninjas X Naukri.com. Code360 powered by Coding Ninjas X Naukri.com
Samsung interview experience Real time questions & tips from candidates to crack your interview

SDE - 1

Samsung
upvote
share-icon
4 rounds | 8 Coding problems

Interview preparation journey

expand-icon
Journey
I started my coding journey from the second year of graduation. I asked and consulted seniors on how to start in my coding journey. I started with DSA first. I was not consistent initially, but in my seventh semester, I started practising DSA on a regular basis. I maintained a streak of 10-15 questions daily. In my last semester, I learnt web development and did some projects as well that helped me enhance my resume. Finally, I was ready to apply in 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: 3 Months
Topics: Data Structures , Algorithms, C++ ,JAVA
Tip
Tip

Always remember question-solving is not everything in the interview, its a part of interview. Communicating well with the interviewer is most important thing during the interview. Also practice lot of Data Structures and Algorithms based questions that I have practiced from Coding Ninjas and on other coding portals. 

Application process
Where: Campus
Eligibility: Above 70 %
Resume Tip
Resume tip

Mention good projects and only those skills in which you are confident.

Interview rounds

01
Round
Easy
Online Coding Test
Duration180 minutes
Interview date12 Dec 2019
Coding problem1

This was Online Coding round on Samsung Software. There were 50 test cases and all test cases should be passed to get selected.

1. Colourful Knapsack

Hard
45m average time
0/120
Asked in companies
GoogleAdobeIBM

You are given N stones, labeled from 1 to N. The i-th stone has the weight W[i]. There are M colors, labeled by integers from 1 to M. The i-th stone has the color C[i] (of course, an integer between 1 to M, inclusive). You want to fill a Knapsack with these stones. The Knapsack can hold a total weight of X. You want to select exactly M stones; one of each color. The sum of the weights of the st...

View more
Problem approach
  • This was solved by me through dynamic programming. Let dp[i][j] denote the maximum possible weight you can fill in the bag with a total capacity of j using exactly one stone of each color from 1 to i. Now you can club all same-colored stones in a vector. Then this problem is same as the classical knapsack problem and I passed all test cases and selected for the next round.
Try solving now
02
Round
Easy
Face to Face
Duration30 minutes
Interview date12 Dec 2019
Coding problem2

This was also Face to Face coding Interview totally based on Data Structures and Algorithms.

1. Longest Increasing Subsequence

Moderate
30m average time
65% success
0/80
Asked in companies
CognizantGoogleSamsung

The Longest Increasing Subsequence (LIS) problem is to find the length of the longest subsequence of a given sequence such that all elements of the subsequence are sorted in increasing order. 

Problem approach
  • Firstly I gave recursion approach but then the interviewer asked me to optimize that so I gave him a standard DP approach for the longest increasing subsequences by storing the result and use them for future calculations of bigger problem.
Try solving now

2. Find the top view of the tree.

Moderate
42m average time
61% success
0/80
Asked in companies
SamsungAdobeMakeMyTrip

Given a binary tree, print the top view of it. The  output nodes can be printed in any order. Expected time complexity is O(n)   

                                                           

    1  

&...

View more
Problem approach
  • I simply used level order traversal and the concept of horizontal distance. Whenever we encountered the first node for a particular horizontal distance then we store that in the map and at last in the map we have tree top view. The interviewer asked me to write its code and I wrote a clean and commented code for it and he was satisfied with that.
Try solving now
03
Round
Easy
Face to Face
Duration30 minutes
Interview date12 Dec 2019
Coding problem3

This Face to Face Interview was Based on coding and projects.

1. Merge Point Of Two Linked Lists

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

To find the merging point of link list(Given pointers to the head nodes of 2 linked lists that merge together at some point, find the Node where the two lists merge. It is guaranteed that the two head Nodes will be different, and neither will be NULL.)  

 

Problem approach
  • At first I gave the interviewer a complete brute force by considering each element of the first list and comparing it with each element of another list but that was inefficient. So I gave the interviewer optimal approach by finding difference of lengths of linked list and then traverse bigger linked list to difference. Now start traversing both linked lists till we find the common element....
View more
Try solving now

2. Description of project

Problem approach
  • I started by giving details of my projects and technology used in projects. Then he asked me the most challenging task in your project which I told him which was related to data passing from one page to another and its regular update.

3. DFS traversal

Moderate
35m average time
65% success
0/80
Asked in companies
SamsungIntuitGoldman Sachs

Implement DFS algorithm for the graph.

Problem approach
  • I simply used the Depth-first search approach to solve this problem and wrote its neat code with good handwriting to the interviewer  and he made me dry run it on few test cases and it was working fine.
Try solving now
04
Round
Easy
HR Round
Duration15 minutes
Interview date12 Dec 2019
Coding problem2

HR round was mainly based on questions about myself and my knowledge about the company.

1. Name different Android versions.

Problem approach
  • Told him different versions, although I didn’t remember all but told him in sequence what I remembered.

2. Tell me about yourself and your family background.

Problem approach
  • Gave him basic introduction of myself and my family.
Join the Discussion
2 replies
profile
10 Mar 2023
1 upvote
0 replies
Reply
profile
10 Mar 2023
0 upvotes
0 replies
Reply
Similar interview experiences
company logo
SDE - 1
4 rounds | 6 problems
Interviewed by Samsung
850 views
0 comments
0 upvotes
company logo
SDE - 1
3 rounds | 4 problems
Interviewed by Samsung
472 views
0 comments
0 upvotes
company logo
SDE - 1
3 rounds | 6 problems
Interviewed by Samsung
1364 views
0 comments
0 upvotes
company logo
SDE - 1
2 rounds | 3 problems
Interviewed by Samsung
878 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
SDE - 1
5 rounds | 12 problems
Interviewed by Amazon
99771 views
24 comments
0 upvotes
company logo
SDE - 1
4 rounds | 5 problems
Interviewed by Microsoft
46686 views
5 comments
0 upvotes
company logo
SDE - 1
3 rounds | 7 problems
Interviewed by Amazon
29284 views
6 comments
0 upvotes