Samsung
Proud winner of ABECA 2024 - AmbitionBox Employee Choice Awards
Filter interviews by
Clear (1)
I applied via Campus Placement and was interviewed before Aug 2022. There were 3 interview rounds.
It was Aon platform where you cannot use C++ STL. questions were on trees dp
I was interviewed 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
I was interviewed in Nov 2020.
Round duration - 180 minutes
Round difficulty - Easy
1) 1 coding question need to be solved in 3 hours.there will be 50 test cases, need to pass all the test cases to go to the next rounds.STL in c++ cannot be used, we need to code anything we use from scratch
2) Coding questions will mainly be based on dynamic programming, graphs and backtracking, so prepare those topics well.
You need to determine all possible paths for a rat starting at position (0, 0) in a square maze to reach its destination at (N-1, N-1). The maze is represented as an N*N ma...
Find all possible paths for a rat in a maze from source to destination.
Use backtracking to explore all possible paths in the maze.
Keep track of visited cells to avoid revisiting them.
Explore all possible directions ('U', 'D', 'L', 'R') from each cell.
Return the list of valid paths sorted in alphabetical order.
Round duration - 60 minutes
Round difficulty - Medium
The technical interview 1 has some questions based on basics of oops, Os and one/two coding questions.
Students who clear this round have to go for another technical round
Given a singly linked list of integers, return the head of the reversed linked list.
Initial linked list: 1 -> 2 -> 3 -> 4 -> NULL
Reversed link...
Reverse a singly linked list of integers and return the head of the reversed linked list.
Iterate through the linked list and reverse the pointers to point to the previous node.
Use three pointers - prev, current, and next to reverse the linked list in O(N) time and O(1) space complexity.
Update the head of the reversed linked list as the last node encountered during reversal.
Ninja is learning about doubly linked lists and wants to remove a specified element from the list. Can you assist Ninja in doing this and returning the modified...
Remove a specified element from a doubly linked list and return the modified list.
Traverse the doubly linked list to find the specified element to be removed.
Update the pointers of the previous and next nodes to skip the node to be deleted.
Handle edge cases like removing the head or tail of the linked list.
Return the modified linked list after removing the specified element.
Round duration - 60 Minutes
Round difficulty - Easy
The interview again began with my resume but it was very exhaustive. While my friends were asked about both resume and DSA concepts, my interview focused entirely on my resume. I had done a project on distributed computing and the interviewer asked me an application question on multi-threading and synchronisation. It was quite difficult because I was trying to explain my approach and I couldn’t make out if the interviewer was happy with my approach or not. Then he asked to design a contact database without the actual use of DBMS in java. Again I tried to explain my approach but it was tough. The interview ended after asing one or more coding questions.
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 nodes to the result list in the order they are visited.
Handle null nodes appropriately to maintain the spiral order.
Example: For input 1 2 3 -1 -1 4 5, the output should be 1 3 2 4 5.
Determine if a given singly linked list of integers forms a cycle or not.
A cycle in a linked list occurs when a node's next
points back to a previous node in the ...
Detect if a singly linked list forms a cycle by checking if a node's next pointer points back to a previous node.
Use Floyd's Cycle Detection Algorithm to determine if there is a cycle in the linked list.
Maintain two pointers, one moving at twice the speed of the other, if they meet at any point, there is a cycle.
Check if the next pointer of any node points to a previously visited node to detect a cycle.
Round duration - 30 minutes
Round difficulty - Easy
This was about 30 minutes long interview. First, she asked introduction, after that she was very interested in my internship that I did in summer and about my interests. She asked few common questions on that.
Tip 1 : learn the graphs,dp,backtracking coding problem to pass the coding round
Tip 2 : brush upon your basics for the interview round
Tip 3 : linked list & tree coding questions are mainly asked in interview
Tip 1 : Be ready to explain your projects fluently
Tip 2 : Android development knowledge will be beneficial
I was interviewed 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.
Samsung interview questions for designations
I was interviewed before Jan 2021.
Round duration - 120 Minutes
Round difficulty - Hard
This round had 3 preety good questions to be solved under 2 hours . The first question was from Graphs and DSU , the second question was related to DP and the third one was from Recursion.
On a 2-D plane, there are ‘N’ stones placed at some integer coordinate points. Each coordinate point can have at most one stone. A stone can be removed if it sh...
Given a 2-D plane with stones at integer coordinate points, find the maximum number of stones that can be removed by sharing the same row or column.
Iterate through the stones and create a graph where stones in the same row or column are connected.
Use depth-first search (DFS) to find connected components in the graph.
The maximum number of stones that can be removed is the total number of stones minus the number of conne
You are provided with a gold mine, represented as a 2-dimensional matrix of size N x M with N rows and M columns. Each cell in this matrix contains a positive integer represent...
The task is to determine the maximum amount of gold a miner can collect by moving in allowed directions in a gold mine represented as a 2D matrix.
Create a 2D DP array to store the maximum gold collected at each cell
Iterate through the matrix from left to right and update the DP array based on the allowed directions
Return the maximum value in the last column of the DP array as the final result
Given a positive integer N
, generate all possible sequences of balanced parentheses using N
pairs of parentheses.
A sequence of brackets is called bala...
Generate all possible sequences of balanced parentheses using N pairs of parentheses.
Use backtracking to generate all possible combinations of balanced parentheses.
Keep track of the number of opening and closing parentheses used.
Add opening parentheses if there are remaining, and add closing parentheses only if there are more opening parentheses than closing.
Recursively generate all valid combinations.
Return the list o
Round duration - 60 Minutes
Round difficulty - Medium
This round had 2 questions from DSA. Both the questions were preety straightforward and were asked to check my implementation skills and how well do I handle Edge Cases for tricky problems.
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.
Use two queues to simulate stack operations: push elements to one queue, then move all elements to the other queue to simulate pop and top operations.
Maintain the size of the stack and check for empty stack using the size of the queues.
Handle edge cases such as popping or getting top element from an empty stack.
Ensure the implementation follows the specified pu...
Given a square matrix 'MATRIX' of non-negative integers, rotate the matrix by 90 degrees in an anti-clockwise direction using only constant extra space.
Rotate a square matrix by 90 degrees in an anti-clockwise direction using constant extra space.
Iterate through each layer of the matrix and swap elements in groups of 4
Transpose the matrix and then reverse each row to achieve the rotation
Ensure to handle edge cases like odd-sized matrices
Round duration - 60 Minutes
Round difficulty - Medium
This round also had 2 questions related to DSA where I was first expected to explain my approaches and then discuss the time and space complexities of my solution. After that , I was asked some core concepts related to OOPS and OS.
Given an array ARR
consisting of N
integers, find all distinct triplets in the array that add up to a given number K
.
T = 2
N = 5
ARR = [1, 2, 3, 4, 5]
K = 9
N = 4
...
Find all distinct triplets in an array that add up to a given number.
Use three nested loops to iterate through all possible triplets.
Sort the array first to easily skip duplicates.
Use two-pointer technique to find the remaining element for each triplet.
Handle edge cases like empty list or no triplet summing up to K.
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 at each bar by taking the minimum of the maximum heights on the left and right.
Sum up the trapped water at each bar to get the total trapped water for the entire array.
Diamond Problem is a multiple inheritance issue in C++ where a class inherits from two classes that have a common base class.
Diamond Problem occurs when a class inherits from two classes that have a common base class, leading to ambiguity in accessing members.
It can be resolved in C++ using virtual inheritance, where the common base class is inherited virtually to avoid duplicate copies of base class members.
Example: c...
Thrashing in operating systems occurs when the system is spending more time swapping data between memory and disk than actually executing tasks.
Occurs when the system is constantly swapping data between memory and disk
Causes a decrease in system performance as it spends more time on swapping than executing tasks
Usually happens when the system does not have enough physical memory to handle the workload efficiently
Round duration - 30 Minutes
Round difficulty - Easy
This was my last round and I hoped it to go good just like the other rounds. The interviewer was very straight to point and professional. The interview lasted for 30 minutes.
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.
Get interview-ready with Top Samsung Interview Questions
I was interviewed 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 was interviewed before Sep 2020.
Round duration - 180 Minutes
Round difficulty - Medium
Round was held in the morning at 10 am.
Given an undirected graph with 'N' nodes in the form of an adjacency matrix and an integer 'M', determine if it is possible to color the vertices of the graph using at most ...
The problem involves determining if a given graph can be colored with at most 'M' colors without adjacent vertices sharing the same color.
Create a function that takes the adjacency matrix, number of nodes 'N', and maximum number of colors 'M' as input.
Implement a graph coloring algorithm such as backtracking or greedy coloring to check if the graph can be colored with at most 'M' colors.
Check if adjacent vertices have ...
Round duration - 40 Minutes
Round difficulty - Medium
The round was held in the evening
Design and implement a Trie (prefix tree) to perform the following operations:
insert(word)
: Add a string "word" to the Trie.search(word)
: Verify if the string "w...Implement a Trie data structure to insert, search, and check for prefixes in strings.
Create a TrieNode class with children and isEndOfWord attributes.
Implement insert, search, and startsWith methods in the Trie class.
Use a Trie to efficiently store and search for strings based on prefixes.
Example: insert 'apple', search 'apple' returns true, startsWith 'app' returns true, search 'app' returns false.
Round duration - 10 Minutes
Round difficulty - Easy
Was held in the morning around 9 am
Tip 1 : Focus on graphs, most questions are from this topic
Tip 2 : Prepare well about the projects you mention in your resume
Tip 3 : Do not fill the resume with too many things. Keep it simple
Tip 1 : Have 2-3 projects on resume. But also be prepared to answer questions related to the projects.
Tip 2 : Do not mention too many things. Keep it short and simple
I was interviewed 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 was interviewed before Jan 2021.
Round duration - 120 Minutes
Round difficulty - Medium
The round had 2 coding problems to solve with varying difficulty. Each candidate had a different set of questions. The round was around 2 pm. The webcam was turned on to keep an eye on candidates.
Given an array ARR
of size N
, where each element represents the height of a balloon. The task is to destroy all balloons by shooting arrows from left to right. When an arrow hits...
Find the minimum number of arrows needed to burst all balloons by shooting arrows from left to right.
Sort the array in non-decreasing order to make it easier to calculate the minimum number of arrows needed.
Iterate through the sorted array and count the number of times the height decreases compared to the previous balloon.
The count of decreases + 1 will give the minimum number of arrows needed to burst all balloons.
Exa...
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 check if both left and right children are NULL to identify leaf nodes.
Use recursion to traverse the tree efficiently.
Keep track of the count of leaf nodes as you traverse the tree.
Handle base cases where the current node is NULL or a leaf node.
Round duration - 60 Minutes
Round difficulty - Medium
This round had 2 questions related to DSA. I was first asked to explain my approach with proper complexity analysis and then code the soution in any IDE that I prefer.
Given a rod of a certain length, the rod can be divided into different sizes, each with an associated cost. Your task is to determine the maximum cost that can be obtained by...
The Rod Cutting Problem involves maximizing the profit obtained by cutting a rod into smaller pieces and selling them.
Use dynamic programming to solve this problem efficiently.
Create a table to store the maximum profit for each sub-length of the rod.
Iterate through the rod lengths and update the table with the maximum profit.
The final answer will be the maximum profit for the total length of the rod.
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 in the array, calculate the XOR with the current element and check if the required XOR value exists in the hashmap.
Increment the count of subarrays whenever the required XOR value is found in the hashmap.
Round duration - 60 Minutes
Round difficulty - Medium
This round had 2 questions of DSA of Easy-Medium difficulty and at the end I was asked a Puzzle to check my general problem solving ability.
You are given a grid containing oranges where each cell of the grid can contain one of the three integer values:
Find the minimum time required to rot all fresh oranges in a grid.
Use Breadth First Search (BFS) to simulate the rotting process of oranges.
Keep track of the time taken to rot all oranges and the count of fresh oranges remaining.
If all fresh oranges are not rotten after simulation, return -1.
Handle edge cases like empty grid or no fresh oranges present.
Example: For the given grid, the minimum time required is 4 seconds
For a given singly linked list, identify if a loop exists and remove it, adjusting the linked list in place. Return the modified linked list.
A...
Detect and remove loop in a singly linked list in place with O(n) time complexity and O(1) space complexity.
Use Floyd's Cycle Detection Algorithm to identify the loop in the linked list.
Once the loop is detected, use two pointers approach to find the start of the loop.
Adjust the pointers to remove the loop and return the modified linked list.
Example: For input 5 2 and 1 2 3 4 5, return 1 2 3 4 5 without the loop.
Round duration - 50 Minutes
Round difficulty - Medium
This round had 2 Algorithmic questions wherein I was supposed to code both the problems after discussing their
approaches and respective time and space complexities . After that , I was grilled on some OOPS concepts related to C++.
You are provided with a string STR
of length N. The task is to find the longest palindromic substring within STR
. If there are several palindromic substring...
Given a string, find the longest palindromic substring within it.
Iterate through the string and expand around each character to find palindromes
Keep track of the longest palindrome found so far
Return the longest palindromic substring
You are provided with an array of integers. The task is to sort the array in ascending order using the quick sort algorithm.
Quick sort is a divide-and-conquer algorithm. It ...
Yes, the quick sort algorithm can be enhanced to achieve NlogN complexity in the worst case by using a randomized version of the algorithm.
Randomized quick sort involves randomly selecting the pivot element to reduce the chances of worst-case scenarios.
By choosing a random pivot, the algorithm becomes less predictable and more likely to achieve the desired time complexity.
This enhancement helps in avoiding the worst-ca...
Friend functions in C++ are functions that are not members of a class but have access to its private and protected members.
Friend functions are declared inside a class with the keyword 'friend'.
They can access private and protected members of the class.
They are not member functions of the class, but have the same access rights as member functions.
Friend functions are useful for implementing operators that are not part ...
Early binding is resolved at compile time while late binding is resolved at runtime in C++.
Early binding is also known as static binding, where the function call is resolved at compile time based on the type of the object.
Late binding is also known as dynamic binding, where the function call is resolved at runtime based on the actual type of the object.
Early binding is faster as the function call is directly linked to ...
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 was interviewed before Jan 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.
Determine the minimum time required to travel from a starting point to a destination point in a two-dimensional coordinate system, considering both direct movement and the...
Find the minimum time to travel from a starting point to a destination point using direct movement and wormholes.
Calculate the time taken for direct movement from source to destination.
Consider using each wormhole to see if it reduces the total travel time.
Choose the path with the minimum total time to reach the destination.
Ninja needs help in a battle against the string man. Given two strings, 'S' and 'T', the task is to find the number of substrings in 'S' that differ from some su...
The task is to find the number of substrings in 'S' that differ from some substrings of 'T' by exactly one character.
Iterate through all substrings of 'S' and 'T' and compare them character by character to find the ones that differ by exactly one character.
Use nested loops to generate all possible substrings of 'S' and 'T'.
Count the number of substrings that differ by exactly one character and return the total count.
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.
Check if the given integer has only one bit set in its binary representation.
Return true if the above conditions are met, else return false.
Round duration - 60 Minutes
Round difficulty - Medium
This round had 2 questions related to DSA where I was first expected to explain my approaches and then discuss the time and space complexities of my solution. After that , I was asked some core concepts related to OS.
Given a singly linked list of integers, return the head of the reversed linked list.
Initial linked list: 1 -> 2 -> 3 -> 4 -> NULL
Reversed link...
Reverse a singly linked list of integers and return the head of the reversed linked list.
Iterate through the linked list and reverse the pointers to point to the previous node instead of the next node.
Use three pointers - prev, current, and next to reverse the linked list in O(N) time and O(1) space complexity.
Update the head of the reversed linked list as the last node encountered during reversal.
You are provided with an undirected graph containing 'N' vertices and 'M' edges. The vertices are numbered from 1 to 'N'. Your objective is to determi...
Detect cycles in an undirected graph.
Use Depth First Search (DFS) to detect cycles in the graph.
Maintain a visited array to keep track of visited vertices.
If a visited vertex is encountered again during DFS, a cycle exists.
Check for cycles in each connected component of the graph.
Example: For input N=3, Edges=[[1, 2], [2, 3], [1, 3]], output is Yes.
Mutex is used for exclusive access to a resource by only one thread at a time, while semaphore can allow multiple threads to access a resource simultaneously.
Mutex is binary semaphore with ownership, used for mutual exclusion.
Mutex is typically used to protect critical sections of code.
Semaphore is a signaling mechanism, used for synchronization between multiple threads.
Semaphore can have a count greater than 1, allowi...
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 to give the illusion of parallel execution.
Multithreading involves breaking a process into multiple threads that can be executed ind...
Round duration - 60 Minutes
Round difficulty - Medium
This round had 2 Algorithmic questions wherein I was supposed to code both the problems after discussing their
approaches and respective time and space complexities . After that , I was grilled on some OOPS concepts related to C++.
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 at each bar by taking the minimum of the maximum heights on the left and right.
Sum up the trapped water at each bar to get the total trapped water for the entire array.
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
Diamond Problem in C++ is a common issue in multiple inheritance where a class inherits from two classes that have a common base class.
Diamond Problem occurs when a class inherits from two classes that have a common base class, leading to ambiguity in accessing members.
It can be resolved in C++ using virtual inheritance, where the common base class is inherited virtually to avoid duplicate copies of base class members.
...
Friend functions in C++ are functions that are not members of a class but have access to its private and protected members.
Friend functions are declared inside a class with the 'friend' keyword.
They can access private and protected members of the class.
They are not member functions of the class, but have the same access rights as member functions.
Friend functions are useful for implementing operators that are not membe...
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.
Top trending discussions
Some of the top questions asked at the Samsung Software Developer interview -
based on 10 interviews
5 Interview rounds
based on 34 reviews
Rating in categories
Sales Executive
1.1k
salaries
| ₹0 L/yr - ₹0 L/yr |
Assistant Manager
959
salaries
| ₹0 L/yr - ₹0 L/yr |
Software Engineer
873
salaries
| ₹0 L/yr - ₹0 L/yr |
Manager
526
salaries
| ₹0 L/yr - ₹0 L/yr |
Senior Engineer
483
salaries
| ₹0 L/yr - ₹0 L/yr |
Apple
LG Electronics
Sony
Xiaomi