Samsung
Proud winner of ABECA 2024 - AmbitionBox Employee Choice Awards
Filter interviews by
I applied via Naukri.com and was interviewed in Nov 2024. There was 1 interview round.
The second largest salary in a database management system (DBMS) can be found by using the ORDER BY and LIMIT clauses in a SQL query.
Use the ORDER BY clause to sort the salaries in descending order
Use the LIMIT clause to retrieve the second row in the sorted result set
Example: SELECT salary FROM employees ORDER BY salary DESC LIMIT 1,1
Calculate the sum of elements in an array that are closest to a given target value.
Iterate through the array and calculate the absolute difference between each element and the target value.
Keep track of the element with the smallest difference and update the sum accordingly.
Return the sum of elements closest to the target value.
I applied via Referral and was interviewed in Mar 2023. There were 3 interview rounds.
The aptitude test is about your basic knowledge in software developing.
JAVA is a versatile programming language used for developing various software applications.
JAVA is platform-independent and can run on any operating system
It is object-oriented and supports multithreading
JAVA is widely used for developing web applications, mobile applications, and enterprise software
It provides a vast library of pre-built classes and APIs for developers to use
JAVA is also used for developing games, sci
I appeared for an interview in Aug 2021.
Round duration - 120 Minutes
Round difficulty - Medium
This was an online coding round where we had 3 questions to solve under 120 minutes. The questions were of medium to hard difficulty level.
You are given a long type array/list ARR
of size N
, representing an elevation map. The value ARR[i]
denotes the elevation of the ith
bar. Your task is to determine th...
Calculate the total amount of rainwater that can be trapped between given elevations in an array.
Iterate through the array and calculate the maximum height on the left and right of each bar.
Calculate the amount of water that can be trapped above each bar by taking the minimum of the maximum heights on the left and right.
Sum up the trapped water above each bar to get the total trapped water for the entire array.
Given a binary matrix of size N * M
where each element is either 0 or 1, find the shortest path from a source cell to a destination cell, consisting only...
Find the shortest path in a binary matrix from a source cell to a destination cell consisting only of 1s.
Use Breadth First Search (BFS) algorithm to find the shortest path.
Initialize a queue with the source cell and keep track of visited cells.
Explore all 4 directions from each cell and update the path length accordingly.
Return the shortest path length or -1 if no valid path exists.
Count the number of leaf nodes present in a given binary tree. A binary tree is a data structure where each node has at most two children, known as the left child and the...
Count the number of leaf nodes in a binary tree.
Traverse the binary tree and count nodes with both children as NULL.
Use recursion to traverse the tree efficiently.
Handle base cases where the node is NULL or a leaf node.
Keep track of the count of leaf nodes as you traverse the tree.
Round duration - 60 Minutes
Round difficulty - Medium
In this round I was first asked 2 questions related to DSA where I was expected to first explain my approach to the interviewer along with proper complexity analysis and then code the implementation in any of my preferred IDE. This was followed by some questions related to OOPS and C++.
You are provided with an array nums
which contains the first N positive integers. In this array, one integer appears twice, and one integer is missi...
Given an array of first N positive integers with one number repeating and one missing, find the repeating and missing numbers.
Iterate through the array and keep track of the sum of elements and sum of squares to find the missing and repeating numbers.
Use a set to identify the repeating number and calculate the missing number based on the sum of elements.
Example: For nums = [1, 2, 3, 4, 4, 5], the repeating number is 4
Given an integer array/list arr
and an integer 'Sum', determine the total number of unique pairs in the array whose elements sum up to the given 'Sum'.
The first line c...
Count the total number of unique pairs in an array whose elements sum up to a given value.
Use a hashmap to store the frequency of each element in the array.
Iterate through the array and for each element, check if (Sum - current element) exists in the hashmap.
Increment the count of pairs if the complement exists in the hashmap.
Divide the count by 2 to avoid counting duplicates like (arr[i], arr[j]) and (arr[j], arr[i])
Structure and union are both used to group different data types, but structure allocates memory for each member separately while union shares the same memory space for all members.
Structure allocates memory for each member separately, while union shares the same memory space for all members.
Structures are used when each member needs its own memory space and unions are used when only one member is accessed at a time.
Str...
C++ supports polymorphism through virtual functions and inheritance.
C++ supports polymorphism through virtual functions and inheritance
Virtual functions allow a function to be overridden in a derived class
Base class pointers can point to derived class objects, allowing for dynamic binding
Example: class Animal { virtual void speak() { cout << 'Animal speaks'; } }; class Dog : public Animal { void speak() { cout &l...
Round duration - 60 Minutes
Round difficulty - Medium
This round had 3 questions from DSA which I had to code under 60 minutes and then the interviewer asked some questions from Operating Systems and Android as I did a project in Mobile App Development.
Given a binary tree with N
nodes, your task is to output the Spiral Order traversal of the binary tree.
The input consists of a single line containing elem...
Implement a function to return the spiral order traversal of a binary tree.
Traverse the binary tree level by level, alternating between left to right and right to left.
Use a queue to keep track of nodes at each level.
Append the values of nodes in each level to the result list in the desired order.
Develop a Stack Data Structure to store integer values using two Queues internally.
Your stack implementation should provide these public functions:
Implement a stack using two queues to store integer values with specified operations.
Create a stack class with two queue data members.
Implement push(data) by enqueuing the data into one of the queues.
Implement pop() by dequeuing all elements from one queue to another until the last element is reached and return it.
Implement top() by dequeuing all elements from one queue to another until the last element is reached, ret...
Given a binary tree of integers, convert it to a sum tree where each node is replaced by the sum of the values of its left and right subtrees. Set leaf nodes to zero.
...Convert a binary tree to a sum tree by replacing each node with the sum of its left and right subtrees.
Traverse the tree in postorder fashion.
For each node, calculate the sum of its left and right subtrees and update the node value.
Set leaf nodes to zero.
Return the level order traversal of the modified tree.
Multitasking refers to the ability of an operating system to run multiple tasks concurrently, while multithreading involves executing multiple threads within a single process.
Multitasking allows multiple processes to run simultaneously on a single processor, switching between them quickly.
Multithreading enables a single process to execute multiple threads concurrently, sharing resources like memory and CPU.
Multitasking...
Android is a mobile operating system developed by Google, based on the Linux kernel and designed primarily for touchscreen devices.
Developed by Google
Based on Linux kernel
Designed for touchscreen devices
Tip 1 : Must do Previously asked Interview as well as Online Test Questions.
Tip 2 : Go through all the previous interview experiences from Codestudio and Leetcode.
Tip 3 : Do at-least 2 good projects and you must know every bit of them.
Tip 1 : Have at-least 2 good projects explained in short with all important points covered.
Tip 2 : Every skill must be mentioned.
Tip 3 : Focus on skills, projects and experiences more.
I appeared for an interview in Jul 2021.
Round duration - 120 Minutes
Round difficulty - Medium
This was an online coding round where we had 3 questions to solve under 120 minutes. The questions were of medium to hard difficulty level.
Given an array or list ARR
consisting of N
integers, your task is to identify all distinct triplets within the array that sum up to a specified number K
.
A t...
The task is to find all distinct triplets in an array that sum up to a specified number.
Iterate through the array and use nested loops to find all possible triplets.
Use a set to store unique triplets and check if the sum equals the target sum.
Handle edge cases like duplicate elements and no valid triplets.
Return the triplets found or '-1' if no valid triplet exists.
You are given two strings str1
and str2
. Determine the minimum number of operations required to transform str1
into str2
.
An operatio...
Determine the minimum number of operations needed to transform one string into another by moving characters to the end.
Iterate through each character in str1 and check if it matches the first character in str2.
If a match is found, calculate the number of operations needed to move the characters to the end.
Return the minimum number of operations needed for each test case, or -1 if transformation is not possible.
Determine whether a given integer N
is a power of two. Return true
if it is, otherwise return false
.
An integer 'N' is considered a power of two if it can be e...
Check if a given integer is a power of two or not.
Check if the given integer is greater than 0.
Use bitwise operations to determine if the integer is a power of two.
Return true if the integer is a power of two, otherwise return false.
Round duration - 60 Minutes
Round difficulty - Medium
Given 'K' different arrays that are individually sorted in ascending order, merge all these arrays into a single array that is also sorted in ascending order.
Merge K sorted arrays into a single sorted array.
Iterate through all arrays and merge them into a single array.
Use a priority queue to efficiently merge the arrays.
Ensure the final array is sorted in ascending order.
Given a binary tree with N
nodes, your task is to output the Spiral Order traversal of the binary tree.
The input consists of a single line containing elem...
Implement a function to return the spiral order traversal of a binary tree.
Traverse the binary tree level by level, alternating between left to right and right to left.
Use a queue to keep track of nodes at each level.
Append the values of nodes in each level to the result list in the desired order.
Structure and union are both used to group different data types, but structure allocates memory for each member separately while union shares the same memory location for all members.
Structure allocates memory for each member separately, while union shares the same memory location for all members.
Structures are used when each member needs its own memory space, while unions are used when only one member is accessed at a...
Round duration - 60 Minutes
Round difficulty - Medium
This round had 2 questions related to Trees and Graphs and some questions revolving around types of Operating Systems their pros and cons.
You are given a Binary Tree, and you need to determine the length of the diameter of the tree.
The diameter of a binary tree is the length of the longest path betwe...
Find the diameter of a binary tree, which is the longest path between any two end nodes.
Traverse the tree to find the longest path between two nodes.
Use recursion to calculate the diameter of the tree.
Keep track of the maximum diameter found during traversal.
Example: For input 1 2 3 4 -1 5 6 -1 7 -1 -1 -1 -1 -1 -1, the diameter is 6.
Given a binary matrix of size N * M
where each element is either 0 or 1, find the shortest path from a source cell to a destination cell, consisting only...
Find the shortest path in a binary matrix from a source cell to a destination cell consisting only of 1s.
Use Breadth First Search (BFS) algorithm to find the shortest path.
Keep track of visited cells to avoid revisiting them.
Update the path length as you traverse the matrix.
Return -1 if no valid path exists.
Tip 1 : Must do Previously asked Interview as well as Online Test Questions.
Tip 2 : Go through all the previous interview experiences from Codestudio and Leetcode.
Tip 3 : Do at-least 2 good projects and you must know every bit of them.
Tip 1 : Have at-least 2 good projects explained in short with all important points covered.
Tip 2 : Every skill must be mentioned.
Tip 3 : Focus on skills, projects and experiences more.
Samsung interview questions for designations
I appeared for an interview in Dec 2020.
Round duration - 90 minutes
Round difficulty - Medium
Given an array or list of words, determine whether the words can be rearranged to form a circle where the last character of one word matches the first character of the ne...
Check if given words can be rearranged to form a circle where the last character of one word matches the first character of the next.
Create a graph where each word is a node and there is an edge between two nodes if the last character of one word matches the first character of the next.
Check if the graph is strongly connected, meaning there is a path between every pair of nodes.
If the graph is strongly connected, retur
In a network of 'N' cities with 'M' paths connecting them, Doctor Ninja aims to purchase a house in a city 'X' such that it is possible to reach every other city fro...
Find the city from which all other cities can be reached in a network of cities connected by paths.
Identify the city 'X' from which all other cities can be reached either directly or indirectly.
Use depth-first search (DFS) to traverse the graph and find the mother vertex.
If multiple options for city 'X' exist, select the city with the smallest number.
If no such city exists, return -1.
Round duration - 90 Minutes
Round difficulty - Easy
You are given a source point (sx, sy) and a destination point (dx, dy). Determine if it is possible to reach the destination point using only the following valid mo...
The problem involves determining if it is possible to reach a destination point from a source point using specified moves.
Iterate through each test case and check if the destination point can be reached from the source point using the given moves.
Keep track of the current position and try all possible moves to reach the destination point.
Return true if the destination point is reachable, otherwise return false.
Round duration - 70 Minutes
Round difficulty - Easy
You are given an array of integers ARR
and an integer X
. Your task is to determine the number of subarrays of ARR
whose bitwise XOR is equal to X
.
Count the number of subarrays in an array whose XOR is equal to a given value.
Iterate through the array and keep track of XOR values and their frequencies using a hashmap.
For each element, calculate the XOR value with all previous elements and check if the XOR value equals the given X.
Use the hashmap to count the number of subarrays with XOR equal to X.
Time complexity can be optimized to O(N) using a hashmap to store X
Round duration - 120 Minutes
Round difficulty - Medium
You are given a Binary Tree, and you need to determine the length of the diameter of the tree.
The diameter of a binary tree is the length of the longest path betwe...
Find the diameter of a binary tree, which is the length of the longest path between any two end nodes.
Traverse the tree to find the longest path between two nodes.
Use recursion to calculate the height of left and right subtrees.
The diameter may pass through the root node or may lie entirely in the left or right subtree.
Update the diameter as the maximum of current diameter, left subtree height + right subtree height +
Tip 1 : practice previous questions
Tip 2 : attend mock interviews
Tip 3 : make your resume with intresting projects
Tip 1 : make it short and attractive
Tip 2 : mention only your top 2 or 3 projects
Get interview-ready with Top Samsung Interview Questions
I appeared for an interview in Nov 2020.
Round duration - 40 minutes
Round difficulty - Medium
It was conducted on hackkerank. MCQs cover various topics including -Data Structures, Aptitude, etc
You are given a binary tree. Your task is to return the count of the diagonal paths to the leaf of the given binary tree such that all the values of the nodes on the diagonal are equa...
Count the number of diagonal paths in a binary tree where all nodes on the diagonal have equal values.
Traverse the binary tree in a diagonal manner and keep track of nodes with equal values.
Use recursion to explore all possible diagonal paths in the tree.
Count the number of paths where all nodes on the diagonal have the same value.
Round duration - 20 minutes
Round difficulty - Medium
This round was conducted on skype. Questions were mainly personality based rather knowledge.
Tip 1 : Practice as much as you can
Tip 2 : Be aware of the methodologies used in your project
Tip 1 : It should be in proper format
Tip 2 : Do not put false things on resume.
I appeared for an interview before Sep 2020.
Round duration - 180 minutes
Round difficulty - Easy
This was Online Coding round on Samsung Software. There were 50 test cases and all test cases should be passed to get selected.
Round duration - 30 minutes
Round difficulty - Easy
This was also Face to Face coding Interview totally based on Data Structures and Algorithms.
The Longest Increasing Subsequence (LIS) problem is to find the length of the longest subsequence of a given sequence with increasing order.
Use dynamic programming to solve the LIS problem efficiently.
Maintain an array to store the length of the LIS ending at each element.
Iterate through the array and update the LIS length based on previous elements.
Example: For input [10, 22, 9, 33, 21, 50, 41, 60, 80], the LIS is [10
Round duration - 30 minutes
Round difficulty - Easy
This Face to Face Interview was Based on coding and projects.
DFS is a graph traversal algorithm that explores as far as possible along each branch before backtracking.
Start at a node and explore as far as possible along each branch before backtracking
Use a stack to keep track of nodes to visit
Mark visited nodes to avoid revisiting them
Recursive implementation is common
Round duration - 15 minutes
Round difficulty - Easy
HR round was mainly based on questions about myself and my knowledge about the company.
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 resume tips for other job seekersMention good projects and only those skills in which you are confident.
Final outcome of the interviewSelectedI appeared for an interview before Sep 2020.
Round duration - 60 minutes
Round difficulty - Easy
This was coding round and was conducted on Cocubes platform. It is not IDE but kind of white board coding platform. C/C++, Java and Python were only allowed languages.
Round duration - 30 minutes
Round difficulty - Easy
This was pen and paper round. Total 40 shortlisted candidates were grouped into 8 groups (each of 5). Each group was given a coding question which they have to solve on paper and explain it to the recruiter. 2 to 3 from each group were selected for the next round.
Round duration - 60 minutes
Round difficulty - Easy
This was general face to face Data Structures and Algorithms based round.
Spiral order traversal of a binary tree involves printing nodes level by level alternating between left to right and right to left.
Start by pushing the root node into a queue.
While the queue is not empty, pop a node, print its value, and push its children into the queue.
For each level, alternate between printing nodes from left to right and right to left.
Repeat until all nodes are printed in spiral order.
Round duration - 45 minutes
Round difficulty - Easy
It was the last round.
Be real during the interview and don’t show off. Also, practice Data Structures and Algorithms based problems as only through practice you will be able to solve questions quickly during the interview. Also prepare for theory subjects like Object-Oriented Programming System, Database Management System, Computer networks, etc.
Application resume tips for other job seekersKeep your resume simple. Prefer LaTeX. Don't use colourful templates. They are too common and very unprofessional. Keep it black and white and keep your content richer. Keep it of 1 page and 2 pages only if you have achieved a lot. Don’t use fillers. Any unwanted information on the resume leaves a bad impact on the interviewer.
Final outcome of the interviewSelectedI appeared for an interview before Sep 2020.
Round duration - 180 minutes
Round difficulty - Medium
In this round, you have to do a coding question on Samsung Coding Platform, which was installed earlier on our lab's system by the company guys. There is only a single question and time limit is of 3 hrs. There are 50 test cases, and you have to pass all the test cases in order to get selected for next round. Also you cannot use any inbuilt library and you have to implement everything from scratch (like stack, queue, hashmap, etc). You can test your code on sample test cases multiple times but the submission limit in only 5, to test the hidden test cases.
Note : Even passing 49 test cases will lead to rejection.
Round duration - 30 minutes
Round difficulty - Medium
There were two questions based on data structures and algorithms and some discussion on the Projects mentioned in resume (Major Project based on Arduino - It's programming and its functionality) .
Given an array/list ARR
of size N
, representing an elevation map where each element ARR[i]
denotes the elevation of the i-th
bar. Your task is to calculate and print ...
Calculate the total amount of rainwater that can be trapped between given elevations in an array.
Use two-pointer approach to keep track of left and right boundaries.
Calculate the trapped water by finding the minimum of maximum heights on left and right sides for each bar.
Sum up the trapped water for all bars to get the total amount of rainwater trapped.
Create a Stack data structure designed specifically to store integer data using two queues.
You need to implement a stack using two internal queues. You can u...
Implement a Stack using Queues to store integer data with push, pop, top, size, and isEmpty functions.
Use two queues to simulate a stack, with one queue acting as the main stack and the other for temporary storage.
For push operation, enqueue the new element to the temporary queue, then dequeue all elements from the main queue to the temporary queue, and finally swap the queues.
For pop operation, dequeue the top element...
You are tasked with implementing a Stack data structure specifically designed to store integer data using two Queues. Utilize the inbuilt Queue for this purpose.
Implement a Stack data structure using two Queues for integer data.
Use two Queues to simulate the Stack behavior.
Push elements by enqueueing them in one Queue.
Pop elements by dequeueing all elements from the first Queue to the second Queue, except the last one.
Top element can be retrieved by dequeuing all elements from the first Queue to the second Queue and then dequeuing the last element.
Size can be obtained by retur...
Round duration - 30 minutes
Round difficulty - Medium
There were two coding questions and I had to write the code on paper.
After that there was a discussion on OOPS concepts like polymorphism and Inheritance.
The interviewer also discussed about padding concept in structures (Indirectly via an example).
Imagine a gold mine represented by a 2D matrix with dimensions 'N' by 'M', where 'N' is the number of rows and 'M' is the number of columns. Each cell in this matrix...
Find the maximum amount of gold a miner can collect from a gold mine by moving right, up diagonally, or down diagonally.
Use dynamic programming to keep track of the maximum gold collected at each cell.
At each cell, consider the maximum gold collected from the cell above, below, and to the left.
Add the current cell's gold value to the maximum gold collected from the adjacent cells to determine the maximum gold at the cu...
Given a rod of length 'N' units, you can cut the rod into different sizes, each with a specific cost associated. The task is to determine the maximum obtainable cost by cutti...
Given a rod of length 'N' with associated costs, find the maximum obtainable cost by cutting the rod optimally.
Implement dynamic programming approach to solve the rod cutting problem efficiently.
Consider all possible ways of cutting the rod and choose the one that maximizes the total cost.
Keep track of subproblems to avoid redundant calculations.
Example: For rod length 4 with costs [2, 5, 7, 8], the maximum cost would
Round duration - 15 minutes
Round difficulty - Easy
Interviewer was friendly. He asked why Samsung, are you comfortable relocating to Bangalore. Also asked about my experience in previous rounds.
Tip 1 : Do practice a lot of coding problems specially Dynamic Programming. I pursued Coding Ninjas Interview preparation Course for cracking the interviews. Also prepared for DBMS, Operating systems and OOPS from Coding Ninjas notes.
Tip 2 : Always start with Brute force approach and then try to optimize it. Practice problems on paper more.
Tip 3 :Be confident during the interview and interact with the interviewer.
Tip 1:Keep your Resume short and crisp, in 1 Page. Have a complete understanding of the Projects mentioned in your resume.
Tip 2:Your interview always revolves around your resume. Go through it thoroughly before the interview.
Top trending discussions
based on 2 interviews
2 Interview rounds
based on 34 reviews
Rating in categories
Sales Executive
1.1k
salaries
| ₹1 L/yr - ₹6.5 L/yr |
Assistant Manager
975
salaries
| ₹5.5 L/yr - ₹19.5 L/yr |
Software Engineer
900
salaries
| ₹6.6 L/yr - ₹25 L/yr |
Manager
529
salaries
| ₹10 L/yr - ₹33 L/yr |
Senior Engineer
480
salaries
| ₹4.6 L/yr - ₹18.4 L/yr |
Apple
Vivo
OPPO
Dell