Mentor Graphics (Siemen EDA) Interview Experience | 2 Years Experienced
For Noida Location
F2F Round 1(2hrs):
- What are virtual functions and virtual destructors?
- What do mean by static keyword?
- Difference between pointers and memory reference?
- When some elements at the beginning of an array are moved to the end, it becomes a rotation of the original array. Please implement a function to get the minimum number in a rotation of an increasing sorted array. For example, the array {3, 4, 5, 1, 2} is a rotation of array {1, 2, 3, 4, 5}, of which the minimum is 1.
- A tree is represented as a matrix M, in which M(i,j) is 1 if ‘i’ is the parent of ‘j’. Write an algorithm to construct the tree from the matrix.
- Given a list of n distinct integers and a sequence of n boxes with preset inequality signs inserted between them, design an algorithm that places the numbers into the boxes to satisfy those inequalities. For example, the numbers 2, 5, 1, and 0 can be placed in the four boxes as shown below:
|_|<|_|<|_|>|_| |0|<|1|<|5|>|2|
- Detect cycle in a directed and undirected graph.
- Find errors and output of the program
C++
Class A {intx;};voidfun(A obj1) {obj1.x = 20;}voidfun1(constA & obj1) {obj1.x = 30;}voidfun2(A * obj1) {obj1 -> x = 40;}intmain() {A obj;obj.x = 10;fun(obj);cout << x << endl;fun1(obj);cout << x << endl;fun2(obj)cout << x << endl;return0;} - Difference between new and malloc.
F2F Round 2(2hrs):
- Difference between map and unordered map.
- What is a static keyword? How can we use non-static variables in static function?
- What is BST and what is the time complexity of searching an element in an array?
- Given a matrix of size m*n. Traverse the matrix in spiral form.
- convert roman numbers to decimal numbers.
- What are templates and write a syntax for declaring a generic class?
- Given 100 balls in which one ball is defective. You also have a balance to tell the minimum number of steps to find the defective ball.
- Puzzle | Measuring Block (https://www.geeksforgeeks.org/puzzle-measuring-block/)
- Write an algorithm to find a kth minimum element from a BST.
- What are storage classes?
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.



