Cadence Interview Experience Software Developer (Off-Campus)
Hi, I was recently interviewed for Software Developer C++ position (off Campus 0 -1 Yr Experience)for Cadence Design Systems (Location: Noida) and got selected.I am a final year (ECE) student. Here is my Cadence Interview experience.
Round 1 (Technical Round):
- PROBLEM STATEMENT: Suppose we have a million of entries in COWIN Registration using phone number (all phone number data need not to be sorted) we have to search a person details having lowest phone number (e.g. 9999999999 > 9999999998) and keep registering of entries of person, how can we do that?
Approach 1: If data (all phone numbers) is stored in then we can simply apply binary search which can take 0(log N) Complexity. But as per the problem statement data is not sorted.
Approach 2: we can keep a priority queue (min-heap) this can keep track of every entries in the form of sorted data and we can find details of person having lowest phone number on the root of tree.
Interviewer: Can you please draw the diagram of particular data using heap to visualize?
9999999910, 9999999997, 9999999917, 9999999915, 9999999912,9999999996.
syntax : priority_queue<int,vector<int>,greater<int>>p;
p.top() 9999999996 (smaller element at root) 9999999996(root) 9999999997(left child) 9999999912(right child) 9999999910(left) 9999999915(right) 9999999917(left)
Interviewer says explain little bit more like how to insert a particular data and how can we traverse, which is more optimised DFS or BFS and also about concept of hashing.
What all are the sorting algorithms do you know? Implement any sorting algorithm.
- Given a linked list, swap every two adjacent nodes and return its head. You must solve the problem without modifying the values in the list’s nodes (i.e., only nodes themselves may be changed)
Input: head = [1,2,3,4] Output: [2,1,4,3]
Round 2(Technical Round):
- Given an array, print the Next Greater Element (NGE) for every element. The Next greater Element for an element x is the first greater element on the right side of x in the array. Elements for which no greater element exist, consider the next greater element as -1.
Input : 11, 13, 21, 3 Output :13, 21, -1, -1
- Given an array of strings strs, group the anagrams together. You can return the answer in any order.
An Anagram is a word or phrase formed by rearranging the letters of a different word or phrase, typically using all the original letters exactly once.
Example 1: Input: strs = ["eat","tea","tan","ate","nat","bat"] Output: [["bat"],["nat","tan"],["ate","eat","tea"]]
Round 3: This round was completely based on C++ concepts.
- How does the map [STL Library] work? What is the time complexity of its implementation? – Map in C++
- The above question leads to the red-black tree – it’s working and properties.
- Whats is a static variable , global variables?
- What are access specifiers? Explain with examples
- What is a const member functions? –const-member-functions-c
- Deep discussion on Constructor.
- Merge-k-sorted-arrays and then further modification in the problem like how to handle duplicates.
- Basics of Sql queries, Operating system (like process vs thread) were asked .
- Long discussion on current work and project.
At last, HR round was done next week and I finally received an offer letter.
Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready. To complete your preparation from learning a language to DS Algo and many more, please refer Complete Interview Preparation Course. In case you are prepared, test your skills using TCS, Wipro, Amazon. Google and Microsoft Test Serieses.