Cadence Design Systems interview experience Real time questions & tips from candidates to crack your interview

SDE - 1

Cadence Design Systems
upvote
share-icon
3 rounds | 10 Coding problems

Interview preparation journey

expand-icon
Journey
It was a great test of my problem-solving & computer science fundamentals, which included DSA, programming language questions & core concepts. Since it is my 3rd interview now, it helped me boost my confidence to a higher level.
Application story
I applied for this position a few months ago (in August). There was a post by an employee of the same company, and I asked for a referral. I got my interview scheduled within a week of applying, and I completed all rounds of the interview within 2 days of the process.
Why selected/rejected for the role?
Since the whole hiring process was based on my problem-solving skills, and I have worked extensively on this for the past 12 months, I was very comfortable with such questions. Also, having high confidence while answering the questions is a bonus.
Preparation
Duration: 6+ months
Topics: Data structures & Algorithms, OOPS, Operating system, DBMS, Computer Networks, Programming languages specific questions
Tip
Tip

Tip 1 : You must be clear with the concepts of the programming languages written in your resume, as you will surely get some questions from them
Tip 2 : Data structures & algorithms are the core of the interview process & you must have a good grasp of them
Tip 3 : Focus on quality of learning over quantity

Application process
Where: Referral
Eligibility: No criteria
Resume Tip
Resume tip

Tip 1: The work experience you have should include the impact areas you contributed to during your tenure. 

Tip 2: Your resume should demonstrate your problem-solving abilities, such as ratings on coding platforms, to facilitate easier referrals.

Interview rounds

01
Round
Easy
Face to Face
Duration50 minutes
Interview date16 Aug 2023
Coding problem3

It was around 3 pm. The interviewer was very supportive and friendly. It was like a two-way communication.

1. Single Number

Easy
10m average time
90% success
0/40
Asked in companies
AmazonCultfitAtlassian

You are given an array A of length N, where N is always an odd integer. There are (N-1)/2 elements in the array that occur twice and one element which occurs once.

Your task is to find the only element that occurs once in the array.

Note: There are (N-1)/2+1 elements that are unique in the array.

Example:
Consider the array be 1,6,4,6,2,4,2
The integers 2, 4, 6 occur twice and only the integer 1 occurs once. 
Problem approach

Brute force solution - O(N):
Step 1: Traverse the array from 0th index to n-2th index.
Step 2: At each iteration compare current element with next element.
Step 3: If they are same then continue, else return that element.
Efficient solution - O(LogN):
Step 1: Traverse the complete array 
Step 2: Take XOR of each element
Step 3: Return the resultant XOR of complete array [As XOR of whole array will return the element occuring once]

Try solving now

2. Validate Binary Tree Nodes

Moderate
15m average time
85% success
0/80
Asked in companies
FacebookMakeMyTripIntuit

You are given ‘N’ binary tree nodes numbered from 0 to N - 1 where node ‘i’ has two children LEFT_CHILD[i] and RIGHT_CODE[i]. Return ‘True’ if and only if all the given nodes form exactly one valid binary tree. If node ‘i’ has no left child then 'LEFT_CHILD[i]' will equal -1, similarly for the right child.

Example:

Let’s say we have n=4 nodes, 'LEFT_CHILD' = {1, -1, 3, -1} and 
RIGHT_CHILD = {2, -1, -1, -1}. So the resulting tree will look like this:

It will return True as there is only one valid binary tree and each node has only one parent and there is only one root.
Try solving now

3. Pair Sum

Easy
15m average time
90% success
0/40
Asked in companies
SalesforceUberPayU

You are given an integer array 'ARR' of size 'N' and an integer 'S'. Your task is to return the list of all pairs of elements such that each sum of elements of each pair equals 'S'.

Note:

Each pair should be sorted i.e the first value should be less than or equals to the second value. 

Return the list of pairs sorted in non-decreasing order of their first value. In case if two pairs have the same first value, the pair with a smaller second value should come first.
Problem approach

Brute force solution - O(N^4):
Step 1: Traverse the mat1 and search for x - mat1[i][j] in mat2 linearly
Efficient solution - O(N^2):
Step 1: Traverse mat2 and store all elements in hash set
Step 2: Now traverse mat1 and find occurences of x-mat1[i][j] in hashset

Try solving now
02
Round
Easy
Face to Face
Duration60 minutes
Interview date16 Aug 2023
Coding problem3

It was again a problem-solving round based on data structures and algorithms. The timing was 11 AM.

1. Intersection of Two Linked Lists

Easy
25m average time
73% success
0/40
Asked in companies
Hewlett Packard EnterpriseSamsungIntuit

You are given two Singly Linked Lists of integers, which may have an intersection point.

Your task is to return the first intersection node. If there is no intersection, return NULL.


Example:-
The Linked Lists, where a1, a2, c1, c2, c3 is the first linked list and b1, b2, b3, c1, c2, c3 is the second linked list, merging at node c1.

alt.txt

Problem approach

Brute force solution - O(N*M): 

Step 1: Traverse list1 and for each of its nodes, find that node in list2. 

Better solution - O(N+M): 

Step 1: Update the structure of the given Node class of the linked list. Add a 'visited' field to it. 

Step 2: Traverse the first list and mark all its nodes as visited = true. 

.Step 3: Now traverse the second list and if you find any node with visited = true, return that node. 

Best solution - O(N+M): 

Step 1: Traverse the first linked list (count the elements) and make it a circular linked list (Remember the last node so that we can break the circle later on). 

Step 2: Now view the problem as finding the loop in the second linked list. Thus, the problem is solved. 

Step 3: Since we already know the length of the loop (size of the first linked list), we can traverse that many nodes in the second list, then start another pointer from the beginning of the second list. We need to traverse until they are equal, which gives us the required intersection point. 

Step 4: Remove the circle from the linked list.

Try solving now

2. Maximum Subarray Sum

Moderate
35m average time
81% success
0/80
Asked in companies
HCL TechnologiesInformaticaSamsung

You are given an array 'arr' of length 'n', consisting of integers.


A subarray is a contiguous segment of an array. In other words, a subarray can be formed by removing 0 or more integers from the beginning and 0 or more integers from the end of an array.


Find the sum of the subarray (including empty subarray) having maximum sum among all subarrays.


The sum of an empty subarray is 0.


Example :
Input: 'arr' = [1, 2, 7, -4, 3, 2, -10, 9, 1]

Output: 11

Explanation: The subarray yielding the maximum sum is [1, 2, 7, -4, 3, 2].
Problem approach

Using Kadane's algorithm: 

Step 1: Initialize the variables max_so_far = INT_MIN and max_ending_here = 0. 

Step 2: Run a for loop from 0 to N-1 and for each index i: 

Step 3: Add arr[i] to max_ending_here. 

Step 4: If max_so_far is less than max_ending_here, update max_so_far to max_ending_here. 

Step 5: If max_ending_here < 0, update max_ending_here = 0. 

Step 6: Return max_so_far.

Try solving now

3. Kth Smallest Element

Moderate
0/80
Asked in companies
FacebookAmazonWells Fargo

You are given a square matrix ‘NxN’ rows and columns. The matrix is sorted, meaning all rows and columns of the matrix are sorted in ascending order. You are also given an integer ‘K’, and your task is to find the ‘K’th smallest element in the sorted order.

For example:
You are given ‘mat’ = [[1, 2, 2,], [3, 3, 4], [5, 6 ,7]]] and ‘K’ = 5, the elements of the matrix are [1, 2, 2, 3, 3, 4, 5, 6, 7], the 5th smallest element in the matrix is 3. Hence the answer is 3.
Problem approach

Brute force solution - O(NLogN):
Step 1: Sort the given array
Step 2: Return the kth index element
Efficient solution - O(NLogK):
Step 1: Initialize a max heap (priority queue) pq.
Step 2: For each element in the array:
Step 3: Push the element onto the max heap.
Step 4: If the size of the max heap exceeds K, pop (remove) the largest element from the max heap. This step ensures that the max heap maintains the K smallest elements encountered so far.
Step 5: After processing all elements, the max heap will contain the K smallest elements, with the largest of these K elements at the top.

Try solving now
03
Round
Easy
Face to Face
Duration50 minutes
Interview date18 Aug 2023
Coding problem4

It was again a problem solving round based on data structure and algorithms. The timing was 11am.

1. Reverse A LL

Moderate
30m average time
65% success
0/80
Asked in companies
PhonePeMicrosoftHCL Technologies

Ninjas is practicing problems on the linked list. He came across a problem in which he has given a linked list of ‘N’ nodes and two integers, ‘LOW’ and ‘HIGH’. He has to return the linked list ‘HEAD’ after reversing the nodes between ‘LOW’ and ‘HIGH’, including the nodes at positions ‘LOW’ and ‘HIGH’.

Problem approach

Step 1: Initialize three pointers prev as NULL, curr as head, and next as NULL.
Step 2: Iterate through the linked list. In a loop, do the following:
Step 3: Before changing the next of curr, store the next node => next = curr -> next
Step 4: Now update the next pointer of curr to the prev => curr -> next = prev 
Step 5: Update prev as curr and curr as next => prev = curr; curr = next;

Try solving now

2. Reverse Level Order Traversal

Moderate
30m average time
52% success
0/80
Asked in companies
MicrosoftAmazonSamsung

You have been given a Binary Tree of integers. You are supposed to return the reverse of the level order traversal.

For example:
For the given binary tree

Example

The reverse level order traversal will be {7,6,5,4,3,2,1}.
Problem approach

Step 1: Define a Node struct to represent a binary tree node. 

Step 2: Define a recursive function addNodesToMap that takes a binary tree node, a level, and a reference to an unordered map, and adds the node to the vector of nodes at its level in the unordered map. This function should then recursively call itself on the left and right subtrees. 

Step 3: Define the main reverseLevelOrder function that takes the root of the binary tree as input and returns a vector containing the nodes in reverse level order. 

Step 4: Inside the reverseLevelOrder function, create an unordered map to store the nodes at each level of the binary tree. 

Step 5: Call the addNodesToMap function on the root of the binary tree with level 0 and a reference to the unordered map to populate the map with nodes. 

Step 6: Iterate over the unordered map in reverse order of the levels and add the nodes to the result vector in the order they appear in the vectors in the unordered map. 

Step 7: Return the result vector containing the nodes in reverse level order.

Try solving now

3. Theory Questions

What is multi-threading in C++? (Learn)

Problem approach

Tip 1: Need to explain what a thread is, how they are made in C++, and their properties.

4. Theory Question

Explain OS Synchronization Concepts (mutex). (Learn)

Problem approach

Tip 1: Mainly, this concept ensures multiple processes access shared resources without interfering with each other and prevents the possibility of inconsistent data due to concurrent access. 

Tip 2: Provide some real-life examples if possible.

Here's your problem of the day

Solving this problem will increase your chance to get selected in this company

Skill covered: Programming

What is recursion?

Choose another skill to practice
Similar interview experiences
company logo
SDE - 1
2 rounds | 5 problems
Interviewed by Cadence Design Systems
2751 views
0 comments
0 upvotes
company logo
SDE - 1
3 rounds | 10 problems
Interviewed by Cadence Design Systems
1828 views
0 comments
0 upvotes
company logo
SDE - 1
3 rounds | 9 problems
Interviewed by Cadence Design Systems
2583 views
0 comments
0 upvotes
company logo
Software Team Lead
4 rounds | 6 problems
Interviewed by Cadence Design Systems
1219 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
SDE - 1
2 rounds | 3 problems
Interviewed by BNY Mellon
6261 views
3 comments
0 upvotes
company logo
SDE - 1
3 rounds | 6 problems
Interviewed by BNY Mellon
0 views
0 comments
0 upvotes
company logo
SDE - 1
3 rounds | 5 problems
Interviewed by CIS - Cyber Infrastructure
2159 views
0 comments
0 upvotes