i
Synopsys
Filter interviews by
Clear (1)
General aptitude questions
Problem solving, solved 2 out of 3 questions
General topics were given in gd
I applied via Referral and was interviewed before Nov 2023. There were 2 interview rounds.
Frog jump dp problem
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
I was interviewed before Feb 2022.
posted on 31 May 2022
I was interviewed before May 2021.
Round duration - 90 minutes
Round difficulty - Easy
Timing - 10AM-11:30AM
Online proctored test
Given a binary tree of integers, your task is to print the right view of it. The right view represents a set of nodes visible when the tree is viewed from the righ...
The task is to print the right view of a binary tree, representing nodes visible from the right side in top-to-bottom order.
Traverse the tree level by level and keep track of the rightmost node at each level
Print the rightmost node of each level to get the right view of the tree
Use a queue for level order traversal and a map to store the rightmost nodes
A thief is planning to rob a store and can carry a maximum weight of 'W' in his knapsack. The store contains 'N' items where the ith item has a weight of 'wi' and a value of...
Yes, the 0/1 Knapsack problem can be solved using dynamic programming with a space complexity of not more than O(W).
Use a 1D array to store the maximum value that can be stolen for each weight from 0 to W.
Iterate through each item and update the array based on whether including the item would increase the total value.
The final value in the array at index W will be the maximum value that can be stolen.
Round duration - 45 minutes
Round difficulty - Medium
Timing : 4PM-5PM
Environment - Online
There was a panel of 3 interviewers
You can find the size of an array in C or C++ by dividing the total size of the array by the size of one element.
Calculate the total size of the array by multiplying the number of elements by the size of each element.
Divide the total size by the size of one element to get the size of the array.
For example, if you have an array of strings arr[] = {'hello', 'world', 'example'}, you can find the size by dividing the total
B+ trees are used for indexing in databases to efficiently search and retrieve data.
B+ trees are balanced trees where each node can have multiple keys and child pointers.
Data is stored in leaf nodes, while non-leaf nodes are used for navigation.
B+ trees are commonly used in databases because of their ability to efficiently search and retrieve data.
Example: In a database table with an index on a specific column, B+ tree...
Round duration - 45 mintues
Round difficulty - Easy
Timing - 11AM-12:15PM
Environment - online video call
Again there was a panel of 2 senior engineers
You are given an n-ary tree consisting of 'N' nodes. Your task is to determine the maximum sum of the path from the root to any leaf node.
For the giv...
Find the maximum sum of the path from the root to any leaf node in an n-ary tree.
Traverse the tree from root to leaf nodes while keeping track of the sum of each path.
At each node, calculate the sum of the path from the root to that node and update the maximum sum found so far.
Consider using depth-first search (DFS) or breadth-first search (BFS) for tree traversal.
Handle cases where nodes have negative values or where
Tip 1 : Brush Up on Computer Science Fundamentals
Tip 2 : Prepare a Brief Self-Introduction
Tip 1 : Do not put fake resume
Tip 2 : Writing internship project helps.
posted on 28 Jun 2024
I applied via Job Portal and was interviewed before Jun 2023. There was 1 interview round.
Recursion tree for a given code
Identify the base case of the recursion
Draw a tree structure with each recursive call as a node
Label each node with the input parameters and return values
posted on 19 Sep 2024
I applied via Naukri.com and was interviewed before Sep 2023. There were 2 interview rounds.
1st round is combination of aptitude and technical mcqs
I have worked on various projects including a web-based inventory management system and a mobile app for tracking fitness goals.
Developed a web-based inventory management system using React and Node.js
Created a mobile app for tracking fitness goals using Flutter
Collaborated with a team to implement new features and fix bugs in existing projects
Two sum code in Python finds two numbers in an array that add up to a specific target.
Use a dictionary to store the difference between the target and each element in the array.
Iterate through the array and check if the current element's complement is in the dictionary.
Return the indices of the two numbers that add up to the target.
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.
based on 2 interviews
Interview experience
based on 3 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