Filter interviews by
Binary search is an efficient algorithm for finding an item in a sorted array by repeatedly dividing the search interval in half.
Sorted Array Requirement: Binary search only works on arrays that are sorted in ascending or descending order.
Divide and Conquer: The algorithm divides the array into halves, eliminating one half from consideration based on the comparison with the middle element.
Time Complexity: The time...
Use binary search to find the maximum value where an API call does not return an error, optimizing the search space efficiently.
Define the search space: Start with a range, e.g., 0 to N, where N is a known upper limit for the API calls.
Implement binary search: Check the middle value of the current range. If the API call succeeds, move to the upper half; if it fails, move to the lower half.
Continue narrowing the ra...
Searching in a rotated sorted array involves finding a target value efficiently using binary search techniques.
Rotated Array: The array is sorted but then rotated at some pivot, e.g., [4, 5, 6, 7, 0, 1, 2] is rotated at 7.
Binary Search: Use binary search to find the target, adjusting the search range based on the rotation point.
Identify Rotation: Determine which half of the array is sorted to decide where to searc...
Combination Sum problem involves finding all unique combinations of numbers that sum to a target value.
Use backtracking to explore all potential combinations.
Start with an empty combination and build it recursively.
If the current sum equals the target, add the combination to results.
If the current sum exceeds the target, backtrack.
Example: For candidates [2, 3, 6, 7] and target 7, valid combinations are [7] and [2...
The time complexity of a solution refers to the amount of time it takes for an algorithm to run based on the input size.
Time complexity is typically expressed using Big O notation, which describes the worst-case scenario for how the runtime grows with respect to the input size.
Common time complexities include O(1) for constant time, O(log n) for logarithmic time, O(n) for linear time, O(n^2) for quadratic time, an...
Flood fill is an algorithm used to determine connected regions in a grid, commonly used in graphics applications.
Flood fill can be implemented using Depth-First Search (DFS) or Breadth-First Search (BFS).
Example: In a 2D grid, starting from a pixel, flood fill changes the color of connected pixels.
Recursive approach: Use a function that calls itself for adjacent pixels.
Iterative approach: Use a stack or queue to e...
Calculate the minimum steps to reach the end of an array using jumps based on values at each index.
Use a greedy approach to track the maximum reachable index at each step.
Initialize variables: steps (to count jumps), maxReach (to track the farthest index), and currentEnd (to mark the end of the current jump).
Iterate through the array, updating maxReach and incrementing steps when reaching currentEnd.
Example: For a...
Design a parking lot system to manage vehicle parking efficiently and effectively.
Define the types of vehicles (cars, bikes, trucks) and their parking requirements.
Implement a reservation system for users to book parking spots in advance.
Incorporate sensors to detect available spots and provide real-time updates.
Design a payment system for hourly, daily, or monthly parking fees.
Consider scalability for future expa...
Volatile keyword in C is used to indicate that a variable may be changed unexpectedly by external factors.
Volatile keyword tells the compiler not to optimize the variable because it can be changed by external factors.
Commonly used for memory-mapped hardware registers or variables accessed by multiple threads.
Example: volatile int *ptr = (int *)0x1234; // pointer to a memory-mapped hardware register
A linked list is a data structure where each element points to the next element in the sequence.
Create a Node class with data and a reference to the next Node
Initialize a LinkedList class with a head Node
Implement methods to add, remove, search, and traverse the linked list
I appeared for an interview in Jan 2017.
Measure the height of a room using a thread.
Tie one end of the thread to a known height point, such as a door handle.
Hold the other end of the thread and let it hang down to the floor.
Mark the point where the thread touches the floor.
Repeat the process at different points in the room to get multiple measurements.
Take the average of the measurements to estimate the height of the room.
Process scheduling is the method by which the operating system decides the order in which processes are executed.
Process scheduling determines the fairness and efficiency of resource allocation.
Different scheduling algorithms prioritize different factors such as CPU utilization, response time, and throughput.
Examples of scheduling algorithms include First-Come, First-Served (FCFS), Round Robin, and Shortest Job Next (S...
To print a linked list in reverse order, we can use recursion or a stack data structure.
Recursion: Traverse the linked list recursively until the end, then print the current node.
Stack: Traverse the linked list and push each node onto a stack. Then pop and print the nodes from the stack.
Dijkstra algorithm is a graph search algorithm that finds the shortest path between nodes in a weighted graph.
Dijkstra algorithm uses a priority queue to select the node with the smallest distance from the source node.
It maintains a distance array to keep track of the shortest distance from the source node to each node in the graph.
The algorithm iteratively selects the node with the smallest distance and updates the di...
Banker's algorithm is a resource allocation and deadlock avoidance algorithm used in operating systems.
Banker's algorithm is used to prevent deadlock in a system with multiple processes and resources.
It works by simulating the allocation of resources to processes and checking if it leads to a safe state.
The algorithm considers the current allocation, maximum needs, and available resources to make decisions.
If a request...
Deadlock is a situation in which two or more processes are unable to proceed because each is waiting for the other to release a resource.
Deadlock occurs when two or more processes are stuck in a circular wait.
Four necessary conditions for deadlock are mutual exclusion, hold and wait, no preemption, and circular wait.
Examples of deadlock prevention techniques include resource allocation graphs and bankers' algorithm.
Dea...
Questions related to Tree and stack
Questions related to Binary search
I applied via Campus Placement
Held on samsung's platform, it is standard
One question on graph theory is given for a duration of three hours.
Calculate the minimum steps to reach the end of an array using jumps based on values at each index.
Use a greedy approach to track the maximum reachable index at each step.
Initialize variables: steps (to count jumps), maxReach (to track the farthest index), and currentEnd (to mark the end of the current jump).
Iterate through the array, updating maxReach and incrementing steps when reaching currentEnd.
Example: For array ...
I applied via Campus Placement and was interviewed in Oct 2024. There were 3 interview rounds.
We were given a DSA question to solve it in 3 hr and have to complete every test case to proceed
Again a DSA question on paper. We need to intuitively give an answer and answer algorithm cpz it's RND
One coding question from dynamic programming
Segment trees efficiently handle range queries for maximum or minimum values in an array.
Segment trees are binary trees used for storing intervals or segments.
They allow querying the maximum or minimum value in a range in O(log n) time.
Building a segment tree takes O(n) time.
Example: For array [1, 3, 2, 7, 9, 11], the segment tree can quickly find max/min in any subarray.
Updates to the array can also be done in O(log n...
Binary lifting ancestors problem involves finding the k-th ancestor of a node in a binary tree efficiently.
Binary lifting is a technique used to find ancestors in a binary tree.
It involves precomputing the ancestors of each node using dynamic programming.
The k-th ancestor of a node can be found by repeatedly jumping up the tree in powers of 2.
Example: Given a binary tree with nodes 1, 2, 3, 4, 5, 6, 7, the 2nd ancestor...
I applied via Walk-in and was interviewed in Oct 2024. There was 1 interview round.
I applied via Naukri.com and was interviewed in Jul 2024. There were 3 interview rounds.
1 question 50 test cases brute force will also work
I applied via Job Portal and was interviewed in Jul 2024. There were 2 interview rounds.
I am a Senior Engineer with 10+ years of experience in designing and implementing complex systems.
10+ years of experience in engineering
Specialize in designing and implementing complex systems
Strong problem-solving skills
Experience with various programming languages such as Java, Python, and C++
Designed and implemented a cloud-based data analytics platform for real-time monitoring of industrial equipment performance.
Led a team of 5 engineers in developing the platform from scratch
Utilized AWS services such as Lambda, S3, and DynamoDB for data storage and processing
Implemented machine learning algorithms for predictive maintenance
Integrated with existing industrial IoT devices for data collection
Achieved 20% r...
I applied via Referral and was interviewed in Jun 2024. There was 1 interview round.
A monitor for APB protocol is a verification component that checks for protocol compliance in APB transactions.
Monitor should check for valid address, data, and control signals in APB transactions
It should detect and report any protocol violations or errors
Monitor should be able to track the state of the APB bus and ensure proper communication between master and slave devices
Design a finite state machine to count the number of people passing through a hallway with 2 detectors, allowing only one person at a time.
Create states for each detector and the hallway
Transition between states based on detector inputs
Use counters to keep track of the number of people passing through
Implement logic to prevent multiple people from passing simultaneously
A rate limiter controls the number of requests a user can make to a service in a given timeframe.
Token Bucket Algorithm: Allows a burst of requests up to a limit, then enforces a steady rate.
Leaky Bucket Algorithm: Processes requests at a constant rate, smoothing out bursts.
Fixed Window Counter: Counts requests in a fixed time window (e.g., 1 minute) and resets after the window ends.
Sliding Window Log: Keeps a log of t...
Top trending discussions
Some of the top questions asked at the Samsung Research interview -
The duration of Samsung Research interview process can vary, but typically it takes about less than 2 weeks to complete.
based on 107 interview experiences
Difficulty level
Duration
based on 1.1k reviews
Rating in categories
Software Engineer
1.7k
salaries
| ₹12 L/yr - ₹22 L/yr |
Lead Engineer
687
salaries
| ₹18.9 L/yr - ₹35.1 L/yr |
Senior Software Engineer
606
salaries
| ₹16 L/yr - ₹25 L/yr |
Chief Engineer
409
salaries
| ₹26.9 L/yr - ₹50 L/yr |
Engineer
344
salaries
| ₹10.9 L/yr - ₹20.2 L/yr |
vivo
OPPO
LG Electronics
Bajaj Electricals