i
Cadence Design Systems
Filter interviews by
Clear (1)
I was interviewed in Sep 2021.
Round duration - 60 minutes
Round difficulty - Medium
Standard Data Structures and Algorithms round . One has to be fairly comfortable in solving algorithmic problems to pass this round with ease.
Given an integer array arr
and an integer Sum
, count and return the total number of pairs in the array whose elements add up to the given Sum
.
The first line contain...
Count and return the total number of pairs in the array whose elements add up to a given sum.
Use a hashmap to store the frequency of each element in the array.
Iterate through the array and for each element, check if (Sum - current element) exists in the hashmap.
Increment the count of pairs if the complement exists in the hashmap.
Given an array ARR
of N
integers, determine the minimum number of jumps required to reach the last index of the array (i.e., N - 1
). From any index i
, you can jump to an in...
The problem involves finding the minimum number of jumps required to reach the last index of an array, where each element indicates the maximum distance that can be jumped from that position.
Use a greedy approach to keep track of the farthest reachable index and the current end of the jump.
Iterate through the array, updating the farthest reachable index and incrementing the jump count when necessary.
Return the jump cou...
Round duration - 70 minutes
Round difficulty - Medium
This round was preety intense and went for over 1 hour . I was asked 2 preety good coding questions (one was from Graphs and the other one was from DP) . After that I was grilled on my Computer Networks and Operating System concepts but luckily I was able to answer all the questions and the interviewer was also quite impressed.
Determine if a given undirected graph can be divided into exactly two disjoint cliques. Print 1 if possible, otherwise print 0.
The first line ...
Check if a given undirected graph can be divided into exactly two disjoint cliques.
Create an adjacency list to represent the graph
Use BFS or DFS to check if the graph is bipartite
If the graph is bipartite, it can be divided into two disjoint cliques
You are provided with 'N' pairs of integers, where the first number in each pair is less than the second number, i.e., in pair (a, b) -> a < b. A pair chain is defi...
Find the length of the longest pair chain that can be formed using the provided pairs.
Sort the pairs based on the second number in each pair.
Iterate through the sorted pairs and keep track of the maximum chain length.
Update the maximum chain length based on the conditions given in the problem statement.
TCP/IP is a set of rules governing the exchange of data over the internet.
TCP/IP stands for Transmission Control Protocol/Internet Protocol.
It is a suite of communication protocols used to connect devices on the internet.
TCP ensures that data is delivered reliably and in order, while IP handles the addressing and routing of data packets.
Examples of TCP/IP applications include web browsing (HTTP), email (SMTP), and file
DHCP Protocol is used to automatically assign IP addresses to devices on a network.
DHCP stands for Dynamic Host Configuration Protocol
It allows devices to obtain IP addresses and other network configuration information dynamically
DHCP servers assign IP addresses to devices for a specific lease period
DHCP uses a client-server model where the client requests an IP address and the server assigns one
DHCP uses UDP port 67 f
Multitasking involves running multiple tasks concurrently, while multithreading allows multiple threads within a single process to run concurrently.
Multitasking allows multiple processes to run concurrently on a single processor, switching between them quickly.
Multithreading allows multiple threads within a single process to run concurrently, sharing resources like memory and CPU time.
Multitasking is at the process lev...
Round duration - 60 minutes
Round difficulty - Hard
This round majorly focused on past projects and experiences from my Resume and some standard System Design + LLD questions + some basic OOPS questions which a SDE-2 is expected to know .
Design a system like Pastebin for sharing text snippets
Use a web application framework like Django or Flask for the backend
Store text snippets in a database like MySQL or MongoDB
Generate unique URLs for each snippet to share with others
Implement features like syntax highlighting, expiration time, and password protection
Consider implementing user accounts for managing and organizing snippets
Data abstraction is the process of hiding implementation details and showing only the necessary features of an object.
Data abstraction can be achieved through classes and objects in object-oriented programming.
It involves creating a class with private data members and public methods to access and modify those data members.
By using data abstraction, users can interact with objects without needing to know the internal wo...
Diamond Problem is a common issue in multiple inheritance in C++ where a class inherits from two classes that have a common base class.
Diamond Problem occurs when a class inherits from two classes that have a common base class, leading to ambiguity in accessing members.
It can be resolved in C++ using virtual inheritance, where the common base class is inherited virtually to avoid duplicate copies of base class members.
...
Friend functions in C++ are functions that are not members of a class but have access to its private and protected members.
Friend functions are declared inside a class with the keyword 'friend'.
They can access private and protected members of the class they are friends with.
Friend functions are not member functions of the class.
They can be standalone functions or functions of another class.
Example: friend void displayD
Tip 1 : Must do Previously asked Interview as well as Online Test Questions.
Tip 2 : Go through all the previous interview experiences from Codestudio and Leetcode.
Tip 1 : Have at-least 2 good projects explained in short with all important points covered.
Tip 2 : Every skill must be mentioned.
Tip 3 : Focus on skills, projects and experiences more.
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 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 in Nov 2016.
Need more context. What needs to be done with the large rectangle?
What are the dimensions of the rectangle?
Is it a 2D or 3D object?
What is the context of the problem?
Are there any constraints or limitations?
What tools or programming languages can be used?
Derive a formula to determine how many smaller rectangles fit into a bigger rectangle given their dimensions.
Calculate the number of times the smaller rectangle can fit into the bigger rectangle horizontally and vertically
Divide the width of the bigger rectangle by the width of the smaller rectangle to get the horizontal count
Divide the height of the bigger rectangle by the height of the smaller rectangle to get the ve...
At least 4 points are required to draw a rectangle.
A rectangle has 4 sides and 4 corners, so at least 4 points are needed to define those corners.
The points must be arranged in a specific order to form a closed shape with 4 sides.
Additional points can be used to add details or modify the shape of the rectangle.
The number of points required may vary depending on the software or tool used to draw the rectangle.
Answering how to calculate new coordinates of a scaled rectangle and providing a program for it.
To calculate new coordinates, multiply the original coordinates by the scaling factor
Scaling factor can be calculated by dividing the new length/breadth by the original length/breadth
Program can take input of original coordinates, scaling factor, and output new coordinates
Example: Original coordinates: (0,0), (0,5), (5,5), (...
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...
posted on 31 Aug 2015
I am a software engineer with 5 years of experience in developing web applications using Java and JavaScript.
I have a Bachelor's degree in Computer Science.
I am proficient in Spring Framework and AngularJS.
I have worked on projects involving RESTful APIs and microservices architecture.
I am a quick learner and enjoy working in a team environment.
I am impressed with the company's innovative approach and commitment to excellence.
I have researched the company and its products extensively and am excited about the potential for growth and development.
I am impressed with the company's reputation for innovation and cutting-edge technology.
I believe that the company's commitment to excellence aligns with my own values and goals.
I am excited about the opportunity to wo...
My future plans include continuous learning, honing my skills, and contributing to the growth of the company.
I plan to attend relevant conferences and workshops to stay updated with the latest technologies.
I want to work on challenging projects that will help me improve my skills.
I aim to become a valuable asset to the company by contributing to its growth and success.
I plan to mentor and guide junior developers to hel
posted on 10 Mar 2015
based on 1 review
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