Thursday, February 5, 2015

Cadence Design Interview experience - Set 1


I was recently invited to attend the interviews of Cadence Systems Design, Noida. I am sharing my experience here.

Round 1: Face to face(with SDE)
1. Find k-largest elements in an array of integeres.I gave a solution with heap. Then was asked to write c++ code for it. 
2. Find the largest palindrome in a string. Write code for it. I solved it using Dynamic Programming.

Round 2: Face to face
1. In an array of integers, where all values are from 1 to k, find the most occurring element.
2. Puzzle: You are given 2 similar eggs, and the egg has some breaking potential i.e., if its dropped from above certain floor of a building, it will break. You have a building of 100 floors. Design an approach such that it takes minimum number of trials to decide the breaking potential of the eggs.
3. Given an array of integers, find the longest increasing subsequence in it. I gave a DP approach.

Round 3: Face to Face
1. Given an array of integers of size 2, one number occurs more than half i.e., more than n/2 times. Find the number in O(n).
2. Given n jobs, each having some dependency on each other. How should you schedule the jobs such that no deadlock occurs. I solved it using DFS and topological sort. If its a DAG, then we can shcedule it. If its cyclic its not possible to solve it.

Round 4: Face to Face(Manager)
1. Puzzle: 100 prisoners standing in a row, one behind other, all facing the same side. Each is wearing either a red/black hat. No oneknows the color of his own hat, but can see the hats of prisoners standing in front of them. Eevery one is asked the color of his own hat. If he gives correct answer, he will be spared. How can the devise a strtegyy so that maximum number of prisoners can be saved.
2. C++ - Static member variables, virtual tables, internal and external linking.
3. Projects in previous company.

Round 5: HR
1. Basic introduction, current work, salary expectations.

If you want to share your interview experience you can mail to codingTonic@gmail.com, or write in the comments section.

No comments :

Post a Comment