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...
A trie is a tree-like data structure used for efficient retrieval of keys in a dataset of strings, often used for autocomplete.
Structure: A trie consists of nodes where each node represents a character of a string, allowing for efficient prefix-based searches.
Insertion: To insert a word, traverse the trie according to the characters of the word, creating new nodes as necessary.
Search: To search for a word, follow ...
Developing a training plan for lateral hires involves assessing skills, defining objectives, and creating tailored learning paths.
Conduct a skills assessment to identify gaps and strengths of lateral hires.
Define clear training objectives aligned with team goals, e.g., improving project management skills.
Create a structured onboarding program that includes company culture and processes.
Incorporate mentorship oppor...
Find the unique number in an array where every other number appears twice.
Use a hash map to count occurrences of each number. Example: [1, 2, 2, 3, 1] -> {1: 2, 2: 2, 3: 1}
Utilize the XOR operation. Example: [1, 2, 2, 3, 1] -> 1 ^ 1 ^ 2 ^ 2 ^ 3 = 3 (the unique number).
Iterate through the array and check for duplicates. Example: [4, 5, 4, 6, 5] -> 6 is unique.
Check if one string is a permutation of another by comparing character counts.
Two strings are permutations if they have the same characters in the same frequency.
Example: 'abc' and 'cab' are permutations.
Use a hash map or array to count character occurrences.
Sort both strings and compare them for a simpler solution.
Example: 'listen' and 'silent' are permutations.
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...
Optimizing job scheduling based on priority and timestamps in a queue.
Use a priority queue to manage jobs based on their priority levels.
Sort jobs by their arrival time and then by priority for scheduling.
Implement a greedy algorithm to select the highest priority job available at each timestamp.
Consider edge cases like jobs arriving at the same time with different priorities.
Example: If jobs A (priority 1, timest...
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...
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
686
salaries
| ₹18.8 L/yr - ₹35 L/yr |
Senior Software Engineer
604
salaries
| ₹16 L/yr - ₹25 L/yr |
Chief Engineer
405
salaries
| ₹27 L/yr - ₹50 L/yr |
Senior Chief Engineer
343
salaries
| ₹30.1 L/yr - ₹55 L/yr |
vivo
OPPO
LG Electronics
Bajaj Electricals