i
Cadence Design
Systems
Filter interviews by
Reverse a linked list recursively
Create a recursive function to reverse the linked list
Pass the current node and its next node as parameters
Update the next pointer of the current node to point to the previous node
Check if two stacks are equal by comparing each element in the stacks
Pop elements from both stacks and compare them one by one
If the sizes of the stacks are different, they are not equal
If any element in the stacks is different, they are not equal
Check if a substring in an array of strings is a palindrome or not.
Iterate through each string in the array
For each string, check if any of its substrings are palindromes
Return true if a palindrome substring is found, false otherwise
To add two linked lists, iterate through both lists simultaneously and add corresponding nodes, considering carry from previous addition.
Create a dummy node to hold the result.
Initialize current node to dummy node.
Iterate through both lists, adding values and carry from previous addition.
Move to next nodes in both lists.
Handle cases where one list is longer than the other.
Handle final carry if present.
Check if a binary tree is a Binary Search Tree (BST)
Perform an in-order traversal of the tree and check if the resulting array is sorted
Keep track of the previous node value during traversal to compare with the current node value
Ensure that each node's value is greater than the previous node's value in the in-order traversal
Use Dijkstra's algorithm to find the shortest path in a graph
Implement Dijkstra's algorithm to find the shortest path between two nodes in a graph
Maintain a priority queue to keep track of the shortest distance to each node
Update the shortest distance to each node as you traverse the graph
Track the path by storing the previous node for each node visited
To add two linked lists, iterate through both lists simultaneously and add corresponding nodes, considering carry from previous addition.
Create a dummy node to hold the result.
Initialize current node to dummy node.
Iterate through both lists, adding values and carry from previous addition.
Move to next nodes in both lists.
Handle cases where one list is longer than the other.
Handle final carry if present.
Use Dijkstra's algorithm to find the shortest path in a graph
Implement Dijkstra's algorithm to find the shortest path between two nodes in a graph
Maintain a priority queue to keep track of the shortest distance to each node
Update the shortest distance to each node as you traverse the graph
Track the path by storing the previous node for each node visited
Check if a binary tree is a Binary Search Tree (BST)
Perform an in-order traversal of the tree and check if the resulting array is sorted
Keep track of the previous node value during traversal to compare with the current node value
Ensure that each node's value is greater than the previous node's value in the in-order traversal
Check if a substring in an array of strings is a palindrome or not.
Iterate through each string in the array
For each string, check if any of its substrings are palindromes
Return true if a palindrome substring is found, false otherwise
I applied via Naukri.com and was interviewed in Feb 2024. There was 1 interview round.
Reverse a linked list recursively
Create a recursive function to reverse the linked list
Pass the current node and its next node as parameters
Update the next pointer of the current node to point to the previous node
Check if two stacks are equal by comparing each element in the stacks
Pop elements from both stacks and compare them one by one
If the sizes of the stacks are different, they are not equal
If any element in the stacks is different, they are not equal
Top trending discussions
Major questions were around problem solving, strings
I applied via Referral and was interviewed in Nov 2023. There were 6 interview rounds.
Duration: 1Hour 30 Minutes, 2 Coding Questions of Total 175 Marks. 1st Question has 75 marks and 2nd Question has 100 marks.
Using Bitwise OR operation to find the smallest missing number in an array.
Iterate through the array and perform Bitwise OR operation with each element to set corresponding bit in a bitmask
Iterate through the bitmask to find the first unset bit, which represents the smallest missing number
Example: Array [0, 1, 3, 4, 6] would have a bitmask of 10101, smallest missing number is 2
Extract data from a dynamic array and perform mathematical operations on it.
Identify the dynamic array structure, e.g., ['12', '15', '20'].
Convert string elements to integers for mathematical operations.
Perform operations like sum, average, or product on the extracted data.
Example: For array ['2', '3', '5'], sum = 2 + 3 + 5 = 10.
Use built-in functions like map() for conversion and reduce() for aggregation.
Pseudo code for a scenario
Define variables and data structures needed
Write the main logic using conditional statements and loops
Handle edge cases and error conditions
Test the pseudo code with sample inputs
I appeared for an interview in Oct 2024, where I was asked the following questions.
Maximize item collection using a sliding window approach on a 1D axis.
Identify the range of positions on the x-axis where items are located.
Use two pointers to represent the current window of positions being considered.
Expand the right pointer to include more items until the window exceeds the desired range.
Contract the left pointer to reduce the window size while maintaining the maximum sum of items.
Keep track of the ...
I applied via Recruitment Consulltant and was interviewed in Sep 2023. There were 2 interview rounds.
1 easy, 1 medium and 1 hard LC
To access files in a different server, use protocols like FTP or SSH. To identify similar key value pairs in multiple files, compare values using a script or tool.
Use FTP or SSH protocols to access files in a different server
Write a script or use a tool to compare key value pairs in multiple files
Identify values that are the same and different across files
Example: Use Python script to read files and compare key value p...
posted on 24 Jun 2024
A Reserve Binary Search Tree (RBST) is a data structure that maintains sorted order and allows efficient insertion, deletion, and search operations.
An RBST is a self-balancing binary search tree that ensures logarithmic height for efficient operations.
Insertion and deletion operations are performed while maintaining the binary search tree properties.
Example: Inserting values 10, 20, 30 in sequence will balance the tree...
posted on 18 Feb 2022
I applied via Company Website and was interviewed in Jan 2022. There was 1 interview round.
A stack is a linear data structure that follows the Last In First Out (LIFO) principle.
Implement using an array or linked list
Push operation adds element to top of stack
Pop operation removes element from top of stack
Peek operation returns top element without removing it
To find intersection of two linked lists, traverse both lists and compare each node.
Traverse both linked lists and compare each node
Use two pointers, one for each linked list
If a node is common, return the node
If both pointers reach the end, return null
posted on 21 Dec 2021
I applied via LinkedIn and was interviewed in Nov 2021. There were 3 interview rounds.
Hashmap is a data structure that stores key-value pairs and allows constant time access to values.
Hashmap uses a hash function to map keys to indices in an array.
Collisions can occur when multiple keys map to the same index, which can be resolved using techniques like chaining or open addressing.
Hashmap operations like insertion, deletion, and lookup have an average time complexity of O(1).
Find pairs in an array with the minimum absolute difference between their values.
Sort the array to bring closer values next to each other.
Iterate through the sorted array and calculate differences between adjacent elements.
Keep track of the minimum difference found and the pairs that yield this difference.
Example: For array [4, 2, 1, 3], sorted is [1, 2, 3, 4]. Minimum difference is 1 (pairs: (1,2), (2,3), (3,4)).
posted on 21 Feb 2025
based on 2 interview experiences
Difficulty level
Duration
based on 1 review
Rating in categories
Lead Software Engineer
159
salaries
| ₹25.2 L/yr - ₹43.4 L/yr |
Principal Software Engineer
118
salaries
| ₹34 L/yr - ₹60 L/yr |
Software Engineer2
114
salaries
| ₹16.6 L/yr - ₹29 L/yr |
Software Engineer
91
salaries
| ₹14.1 L/yr - ₹25.7 L/yr |
Lead Engineer
71
salaries
| ₹16.5 L/yr - ₹44.9 L/yr |
Synopsys
Qualcomm
Intel
Molex