i
Synopsys
Filter interviews by
Clear (1)
I applied via Campus Placement and was interviewed before Jun 2019. There were 3 interview rounds.
Top trending discussions
To check if a directed graph is cyclic or not
Use Depth First Search (DFS) algorithm to traverse the graph
Maintain a visited set to keep track of visited nodes
Maintain a recursion stack to keep track of nodes in the current DFS traversal
If a node is visited and is already in the recursion stack, then the graph is cyclic
If DFS traversal completes without finding a cycle, then the graph is acyclic
Return a random byte from a stream of bytes with equal probability.
Create a variable to store the count of bytes read
Create a variable to store the current random byte
For each byte read, generate a random number between 0 and the count of bytes read
If the random number is 0, store the current byte as the random byte
Return the random byte
Check if a binary tree is a binary search tree or not.
Traverse the tree in-order and check if the values are in ascending order.
For each node, check if its value is greater than the maximum value of its left subtree and less than the minimum value of its right subtree.
Use recursion to check if all nodes in the tree satisfy the above condition.
Algorithm to find Nth-to-Last element in a singly linked list of unknown length
Traverse the list and maintain two pointers, one at the beginning and one at Nth node from beginning
Move both pointers simultaneously until the second pointer reaches the end of the list
The first pointer will be pointing to the Nth-to-Last element
If N=0, return the last element
Parse the list only once
Print all possible permutations of an array of integers
Use recursion to swap elements and generate permutations
Start with the first element and swap it with each subsequent element
Repeat the process for the remaining elements
Stop when all elements have been swapped with the first element
Print each permutation as it is generated
Design a stack that prints the minimum element pushed in O(1)
Use two stacks, one for storing elements and another for storing minimums
When pushing an element, compare it with the top of minimum stack and push the smaller one
When popping an element, pop from both stacks
To get the minimum element, just return the top of minimum stack
To find the starting point of a loop in a linked list, use Floyd's cycle-finding algorithm.
Use two pointers, one moving at twice the speed of the other.
When they meet, move one pointer to the head of the list and keep the other at the meeting point.
Move both pointers one step at a time until they meet again, which is the starting point of the loop.
To find a number in a matrix where all rows and columns are sorted non-decreasingly. Complexity of the solution.
Use binary search to find the number in each row and column
Start from the top-right corner or bottom-left corner to optimize search
Time complexity: O(m log n) or O(n log m) depending on the starting corner
posted on 14 Jul 2017
posted on 12 Jul 2016
I applied via Campus Placement
The question is about finding the minimum steps to reach from a source string to a destination string using three operations.
BFS and DFS are graph traversal techniques that can be used to solve this problem.
BFS is typically used when finding the shortest path or exploring all possible paths in a graph.
DFS is useful when searching for a specific path or exploring deeply into a graph.
In this case, BFS can be used to find...
I applied via Campus Placement and was interviewed in Dec 2016. There were 5 interview rounds.
UDP is preferred over TCP in this project due to its low latency and lightweight nature.
UDP is a connectionless protocol, which means it does not establish a direct connection between the sender and receiver.
UDP is faster than TCP as it does not have the overhead of establishing and maintaining a connection.
UDP is suitable for applications where real-time data transmission is crucial, such as video streaming or online ...
To clear the 7th bit in a 32-bit register, perform a bitwise AND operation with a mask that has all bits set to 1 except the 7th bit.
Create a mask with the 7th bit set to 0 and all other bits set to 1
Perform a bitwise AND operation between the register and the mask
Store the result back in the register
posted on 23 Sep 2017
I was interviewed in Sep 2017.
An SR flip-flop can be implemented using NAND gates.
Use two NAND gates to create the SR flip-flop.
Connect the output of one NAND gate to the input of the other NAND gate.
Connect the Set (S) and Reset (R) inputs to the inputs of the NAND gates.
The output of the first NAND gate is the Q output, and the output of the second NAND gate is the Q̅ output.
The answer describes the steps to find and display the temperature of N rooms.
Create an array to store the temperature of each room
Iterate through each room and prompt the user to enter the temperature
Store the temperature in the corresponding array index
Display the temperature of each room
posted on 10 May 2015
Locate sum of 2 numbers in a linear array (unsorted and sorted) and their complexities
For unsorted array, use nested loops to compare each element with every other element until the sum is found
For sorted array, use two pointers approach starting from the beginning and end of the array and move them towards each other until the sum is found
Complexity for unsorted array is O(n^2) and for sorted array is O(n)
Pointers are used to manipulate memory addresses and values in C++. Increment/decrement, address of and value at operators are commonly used.
Incrementing a pointer moves it to the next memory location of the same data type
Decrementing a pointer moves it to the previous memory location of the same data type
The address of operator (&) returns the memory address of a variable
The value at operator (*) returns the value sto
To determine if a point is inside or outside a rectangle, we check if the point's coordinates fall within the rectangle's boundaries.
Check if the point's x-coordinate is greater than the left edge of the rectangle
Check if the point's x-coordinate is less than the right edge of the rectangle
Check if the point's y-coordinate is greater than the top edge of the rectangle
Check if the point's y-coordinate is less than the b...
To find line that divides rectangle into 2 equal halves through a point inside it.
Find the center of the rectangle
Draw a line from the center to the given point
Extend the line to the opposite side of the rectangle
The extended line will divide the rectangle into 2 equal halves
There are multiple combinations of 8-bit and 16-bit signed numbers. How many such combinations are possible?
There are 2^8 (256) possible combinations of 8-bit signed numbers.
There are 2^16 (65,536) possible combinations of 16-bit signed numbers.
To find the total number of combinations, we can add the number of combinations of 8-bit and 16-bit signed numbers.
Therefore, the total number of possible combinations is 256 +
Find duplicates in an array of elements in 0(n) time and 0(1) space.
Use the property of inputs to your advantage
Iterate through the array and mark elements as negative
If an element is already negative, it is a duplicate
Return all the negative elements as duplicates
I was interviewed before May 2016.
I applied via Campus Placement and was interviewed in Dec 2016. There were 5 interview rounds.
Design logical circuits for arithmetic circuits in a blackbox.
Understand the functionality of the arithmetic circuits in the blackbox.
Identify the inputs and outputs of the blackbox.
Design logical circuits using logic gates to replicate the arithmetic operations.
Test the logical circuits to ensure they produce the same outputs as the arithmetic circuits.
Recursion in embedded C-code allows a function to call itself, useful for repetitive tasks or complex algorithms.
Ensure proper base case to avoid infinite recursion
Use stack space efficiently as embedded systems have limited resources
Avoid recursive functions with deep call stacks to prevent stack overflow
Example: Recursive function to calculate factorial of a number
I applied via Campus Placement and was interviewed in Dec 2016. There were 4 interview rounds.
based on 2 reviews
Rating in categories
R&D Engineer
148
salaries
| ₹0 L/yr - ₹0 L/yr |
Senior R&D Engineer
100
salaries
| ₹0 L/yr - ₹0 L/yr |
Staff Engineer
89
salaries
| ₹0 L/yr - ₹0 L/yr |
Security Consultant
60
salaries
| ₹0 L/yr - ₹0 L/yr |
Applications Engineer
58
salaries
| ₹0 L/yr - ₹0 L/yr |
Cadence Design Systems
Mentor Graphics
Ansys Software Private Limited
Infineon Technologies