i
Cadence Design Systems
Filter interviews by
Medium coding qs with technical interview
Reverse an array of strings
Create a new array and iterate through the original array in reverse order, adding each element to the new array
Use built-in array methods like reverse() or spread operator for a more concise solution
Ensure to handle edge cases like empty array or null values
I was interviewed before Sep 2020.
Round duration - 30 minutes
Round difficulty - Easy
To search for a node in a linked list, iterate through the list and compare each node's value with the target value.
Start at the head of the linked list
Iterate through each node by following the 'next' pointer
Compare the value of each node with the target value
Return the node if found, otherwise return null
To detect a loop in a linked list, we can use Floyd's Cycle Detection Algorithm.
Initialize two pointers, slow and fast, at the head of the linked list.
Move slow pointer by one step and fast pointer by two steps.
If there is a loop, the two pointers will eventually meet.
Alternatively, we can use a hash set to store visited nodes and check for duplicates.
Implement a stack using a singly linked list
Create a Node class with data and next pointer
Create a Stack class with top pointer pointing to the top of the stack
Implement push, pop, and peek operations by manipulating the linked list
Example: Node class - Node { int data; Node next; }
Round duration - 40 minutes
Round difficulty - Easy
The top view of a binary tree shows the nodes visible from the top when looking down from the root node.
The top view of a binary tree is the set of nodes visible from the top when looking down from the root node.
Nodes at the same horizontal distance from the root are considered at the same level in the top view.
If multiple nodes are at the same horizontal distance, only the topmost node at that level is included in the...
Deleting a node from a linked list involves updating pointers to maintain the list's integrity.
Identify the node to be deleted by traversing the list
Update the previous node's next pointer to skip the node to be deleted
Free the memory allocated to the node to be deleted
Do practice a lot of questions on linked list and stacks as these are two most important data structures asked in the interview. Also, try to implement it yourself without seeing the solution. Also prepare for Computer Science subjects like Operating System, Database Management System, Computer Networks, etc. I prepared them through Coding Ninjas notes which were simpler and easy to understand.
Application resume tips for other job seekersKeep your resume short and up to mark and check spellings before submitting it for the interview process.
Final outcome of the interviewSelectedTop 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 in Jul 2017.
Code to print * in five consecutive lines
Use a loop to iterate five times
Inside the loop, print a string containing a single * character
Code to calculate number of bounces a ball goes through until it comes to rest.
Use a loop to simulate the bounces until the ball stops bouncing
Calculate the height of each bounce using the given formula
Keep track of the number of bounces in a counter variable
The best and less time consuming way to calculate factorial of a number is using iterative approach.
Iteratively multiply the number with all the numbers from 1 to the given number
Start with a result variable initialized to 1
Multiply the result with each number in the range
Return the final result
Code to find factorial using function recursion
Define a function that takes an integer as input
Check if the input is 0 or 1, return 1 in that case
Otherwise, call the function recursively with input-1 and multiply it with the input
I was interviewed before Feb 2022.
posted on 6 Mar 2024
posted on 11 Jun 2022
I applied via LinkedIn and was interviewed in Dec 2021. There was 1 interview round.
I applied via Campus Placement and was interviewed in Dec 2022. There were 3 interview rounds.
First 20 question for apti and then coding round of 20 questions each from c/c++ , java and SQL
No, multiple inheritance is not allowed in Java.
Java does not support multiple inheritance for classes to avoid the diamond problem.
However, multiple inheritance is allowed for interfaces in Java.
Example: class A extends B, C is not allowed, but interface A extends B, C is allowed.
Inheritance is a concept in object-oriented programming where a class inherits properties and behaviors from another class.
Allows a class to inherit attributes and methods from another class
Promotes code reusability and reduces redundancy
Creates a parent-child relationship between classes
Example: Class 'Car' can inherit properties and methods from class 'Vehicle'
Polymorphism in software development is like a person driving different vehicles using the same driving skills.
Polymorphism allows objects of different classes to be treated as objects of a common superclass.
For example, a superclass 'Shape' can have subclasses like 'Circle' and 'Rectangle' which can be treated as 'Shape' objects.
Calling a method like 'draw()' on a 'Shape' object will execute the specific implementatio...
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
Some of the top questions asked at the Cadence Design Systems Software Developer interview for freshers -
based on 1 interview
Interview experience
based on 4 reviews
Rating in categories
Lead Software Engineer
157
salaries
| ₹0 L/yr - ₹0 L/yr |
Software Engineer2
103
salaries
| ₹0 L/yr - ₹0 L/yr |
Principal Software Engineer
93
salaries
| ₹0 L/yr - ₹0 L/yr |
Software Engineer
84
salaries
| ₹0 L/yr - ₹0 L/yr |
Design Engineer
72
salaries
| ₹0 L/yr - ₹0 L/yr |
Synopsys
Mentor Graphics
Ansys Software Private Limited
Autodesk