i
Synopsys
Filter interviews by
Processes are independent programs while threads are lightweight processes within a program.
Processes have their own memory space while threads share memory space.
Processes communicate through inter-process communication while threads communicate directly.
Processes are slower to create and terminate than threads.
Examples of processes are web browsers, word processors, etc. while examples of threads are spell check...
Boundary traversal of a binary tree is the process of visiting the nodes on the boundary of the tree.
Start with the root node and traverse the left boundary nodes from top to bottom.
Traverse the leaf nodes from left to right.
Traverse the right boundary nodes from bottom to top.
Exclude the leaf nodes that are already traversed in the second step.
Repeat the above steps for all the subtrees of the binary tree.
To find the middle of a linked list, use two pointers - one moving at twice the speed of the other.
Use two pointers - slow and fast
Slow pointer moves one node at a time, fast pointer moves two nodes at a time
When fast pointer reaches the end, slow pointer will be at the middle
C++ is an extension of C with object-oriented programming features.
C++ supports classes and objects while C does not.
C++ has better support for polymorphism and inheritance.
C++ has a standard template library (STL) for data structures and algorithms.
C++ allows function overloading while C does not.
C++ has exception handling while C does not.
Producer and consumer problem is a synchronization problem in computer science where multiple processes share a common resource.
It occurs when multiple processes try to access a shared resource simultaneously.
The producer produces data and the consumer consumes it.
The problem is to ensure that the producer does not produce data when the buffer is full and the consumer does not consume data when the buffer is empty...
Steps for client server connection request.
Client sends a connection request to the server.
Server receives the request and sends a response.
Client receives the response and establishes a connection.
Connection is maintained until terminated by either party.
Linear data structures have a sequential arrangement of elements while non-linear data structures have a hierarchical arrangement.
Linear data structures have a fixed number of elements and are easy to traverse.
Non-linear data structures have an arbitrary number of elements and are difficult to traverse.
Arrays, linked lists, and stacks are examples of linear data structures.
Trees, graphs, and heaps are examples of ...
The left view of a binary tree shows the nodes that are visible when the tree is viewed from the left side.
Traverse the tree recursively from left to right
Print the first node encountered at each level
Example: For tree with root node A, left view is A, B, D, G
Semaphores, OSI layers, deadlock and ACID protocols in DBMS
Semaphores are used for process synchronization and communication
OSI model has 7 layers: Physical, Data Link, Network, Transport, Session, Presentation, Application
Deadlock protocols prevent processes from entering a deadlock state
ACID protocols ensure database transactions are reliable and consistent
I applied via Referral and was interviewed before Aug 2020. There were 4 interview rounds.
C++ is an extension of C with object-oriented programming features.
C++ supports classes and objects while C does not.
C++ has better support for polymorphism and inheritance.
C++ has a standard template library (STL) for data structures and algorithms.
C++ allows function overloading while C does not.
C++ has exception handling while C does not.
To find the middle of a linked list, use two pointers - one moving at twice the speed of the other.
Use two pointers - slow and fast
Slow pointer moves one node at a time, fast pointer moves two nodes at a time
When fast pointer reaches the end, slow pointer will be at the middle
Semaphores, OSI layers, deadlock and ACID protocols in DBMS
Semaphores are used for process synchronization and communication
OSI model has 7 layers: Physical, Data Link, Network, Transport, Session, Presentation, Application
Deadlock protocols prevent processes from entering a deadlock state
ACID protocols ensure database transactions are reliable and consistent
Boundary traversal of a binary tree is the process of visiting the nodes on the boundary of the tree.
Start with the root node and traverse the left boundary nodes from top to bottom.
Traverse the leaf nodes from left to right.
Traverse the right boundary nodes from bottom to top.
Exclude the leaf nodes that are already traversed in the second step.
Repeat the above steps for all the subtrees of the binary tree.
Linear data structures have a sequential arrangement of elements while non-linear data structures have a hierarchical arrangement.
Linear data structures have a fixed number of elements and are easy to traverse.
Non-linear data structures have an arbitrary number of elements and are difficult to traverse.
Arrays, linked lists, and stacks are examples of linear data structures.
Trees, graphs, and heaps are examples of non-l...
Steps for client server connection request.
Client sends a connection request to the server.
Server receives the request and sends a response.
Client receives the response and establishes a connection.
Connection is maintained until terminated by either party.
Producer and consumer problem is a synchronization problem in computer science where multiple processes share a common resource.
It occurs when multiple processes try to access a shared resource simultaneously.
The producer produces data and the consumer consumes it.
The problem is to ensure that the producer does not produce data when the buffer is full and the consumer does not consume data when the buffer is empty.
Exam...
Processes are independent programs while threads are lightweight processes within a program.
Processes have their own memory space while threads share memory space.
Processes communicate through inter-process communication while threads communicate directly.
Processes are slower to create and terminate than threads.
Examples of processes are web browsers, word processors, etc. while examples of threads are spell checkers, ...
Top trending discussions
Basics of electrical and Electronics
posted on 6 Apr 2022
I appeared for an interview before Apr 2021.
Round duration - 75 minutes
Round difficulty - Medium
This was an online coding round where I had 2 questions to solve under 75 minutes. Both the coding questions were of Medium to Hard level of difficulty.
Given two strings, S
and X
, your task is to find the smallest substring in S
that contains all the characters present in X
.
S = "abdd"
X = "bd"
Find the smallest substring in S that contains all characters in X.
Use a sliding window approach to find the smallest substring in S that contains all characters in X.
Keep track of the characters in X using a hashmap.
Move the window by adjusting the start and end pointers until all characters in X are found.
Return the smallest substring encountered.
Given a binary tree where each node contains an integer value, and a value 'K', your task is to find all the paths in the binary tree such that the sum of the node values in ...
Find all paths in a binary tree where the sum of node values equals a given value 'K'.
Traverse the binary tree using DFS and keep track of the current path and its sum.
At each node, check if the current sum equals 'K' and add the path to the result.
Continue traversal to the left and right child nodes recursively.
Return the list of paths that sum up to 'K'.
Round duration - 60 Minutes
Round difficulty - Medium
This round had 2 questions of DS/Algo to solve under 60 minutes and 2 questions related to Operating Systems.
You are provided with a binary tree containing 'N' nodes. Your task is to determine if this tree is a Partial Binary Search Tree (BST). Return t...
Validate if a binary tree is a Partial Binary Search Tree (BST) by checking if each node's left subtree contains nodes with data less than or equal to the node's data, and each node's right subtree contains nodes with data greater than or equal to the node's data.
Check if each node's left subtree follows BST property (data <= node's data) and right subtree follows BST property (data >= node's data)
Recursively che...
Given an array of integers with 'N' elements, determine the length of the longest subsequence where each element is greater than the previous element. This...
Find the length of the longest strictly increasing subsequence in an array of integers.
Use dynamic programming to solve this problem efficiently.
Initialize an array to store the length of the longest increasing subsequence ending at each index.
Iterate through the array and update the length of the longest increasing subsequence for each element.
Return the maximum value in the array as the result.
Processes are instances of a program in execution, while threads are lightweight processes within a process.
A process is a program in execution, with its own memory space and resources.
Threads are lightweight processes within a process, sharing the same memory space and resources.
Processes are independent of each other, while threads within the same process can communicate and share data.
Example: A web browser running ...
Different types of semaphores include binary semaphores, counting semaphores, and mutex semaphores.
Binary semaphores: Can only have two states - 0 or 1. Used for mutual exclusion.
Counting semaphores: Can have multiple states. Used for managing resources with limited capacity.
Mutex semaphores: Similar to binary semaphores but with additional features like priority inheritance.
Named semaphores: Can be shared between proc...
Round duration - 60 Minutes
Round difficulty - Hard
In this round, I was asked 3 coding questions out of which I had to implement the first two and for the last question I was only asked the optimal approach. The main challenge in this round was to implement the first two questions in a production ready manner without any bugs and so I had to spent some time thinking about some Edge Cases which were important with respect to the question.
You are given an array arr
of length N
. For each element in the array, find the next greater element (NGE) that appears to the right. If there is no such greater ele...
The task is to find the next greater element for each element in an array to its right, if no greater element exists, return -1.
Use a stack to keep track of elements for which the next greater element is not found yet.
Iterate through the array from right to left and pop elements from the stack until a greater element is found.
Store the next greater element for each element in a separate array.
If the stack is empty afte...
Given a sorted array of 'N' integers, your task is to generate the power set for this array. Each subset of this power set should be individually sorted.
A power set of a set 'ARR' i...
Generate power set of a sorted array of integers with individually sorted subsets.
Use recursion to generate all possible subsets by including or excluding each element in the array.
Sort each subset before adding it to the power set.
Handle base case when all elements have been considered to add the subset to the power set.
Ninja is learning about sorting algorithms, specifically those that do not rely on comparisons. Can you help Ninja implement the counting sort algorithm?
Implement counting sort algorithm to sort an array of integers without comparisons.
Count the frequency of each element in the input array.
Create a prefix sum array to determine the position of each element in the sorted array.
Iterate through the input array and place each element in its correct position based on the prefix sum array.
Time complexity of counting sort is O(n+k), where n is the number of elements and k is ...
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 applied via Naukri.com and was interviewed before Jun 2022. There were 3 interview rounds.
I appeared for an interview in Jul 2022.
Volatile const is used to indicate that a variable's value may change outside the program's control.
Volatile const is used for hardware registers that can change their value without the program's knowledge.
It is also used for variables that are accessed by multiple threads.
Example: volatile const int* const ptr = (int*)0x1234; // pointer to a hardware register
Normalization is the process of organizing data in a database to reduce redundancy and improve data integrity.
Normalization is used to eliminate data redundancy by breaking up tables into smaller, related tables.
It helps in reducing data anomalies such as insertion, update, and deletion anomalies.
Normalization is achieved through a series of stages called normal forms, with the most common being First Normal Form (1NF)...
Armstrong algorithm is used to find Armstrong numbers in a given range.
Iterate through the numbers in the given range
Calculate the sum of cubes of each digit in the number
Check if the sum is equal to the original number
posted on 21 Feb 2025
I applied via Naukri.com and was interviewed in Aug 2022. There were 2 interview rounds.
I applied via Job Portal and was interviewed before Mar 2023. There were 3 interview rounds.
ZeroOddEven program will always be asked
R&D Engineer
160
salaries
| ₹8.1 L/yr - ₹27.6 L/yr |
Staff Engineer
159
salaries
| ₹18 L/yr - ₹48 L/yr |
Senior R&D Engineer
92
salaries
| ₹15 L/yr - ₹35 L/yr |
Software Engineer
75
salaries
| ₹6.5 L/yr - ₹25 L/yr |
Security Consultant
73
salaries
| ₹5.8 L/yr - ₹16.9 L/yr |
Intel
Apar Industries
Molex
TDK India Private Limited