Mentor Graphics (Siemen EDA) Interview Experience | 2 Years Experienced - GeeksforGeeks

06 Aug, 2021
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|
|2|Detect cycle in a directed and undirected graph.Find errors and output of the programC++C++Class A {    int x;  };  void fun(A obj1) {    obj1.x = 20;}  void fun1(const A & obj1) {    obj1.x = 30;}  void fun2(A * obj1) {    obj1 -> x = 40;}  int main() {    A obj;    obj.x = 10;    fun(obj);    cout << x << endl;    fun1(obj);    cout << x << endl;    fun2(obj)    cout << x << endl;    return 0;}Difference between new and malloc.
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|
|2|
|_|<|_|
|_|
|0|<|1|
|2|
Detect cycle in a directed and undirected graph.
Find errors and output of the programC++C++Class A {    int x;  };  void fun(A obj1) {    obj1.x = 20;}  void fun1(const A & obj1) {    obj1.x = 30;}  void fun2(A * obj1) {    obj1 -> x = 40;}  int main() {    A obj;    obj.x = 10;    fun(obj);    cout << x << endl;    fun1(obj);    cout << x << endl;    fun2(obj)    cout << x << endl;    return 0;}
C++
Class A {    int x;  };  void fun(A obj1) {    obj1.x = 20;}  void fun1(const A & obj1) {    obj1.x = 30;}  void fun2(A * obj1) {    obj1 -> x = 40;}  int main() {    A obj;    obj.x = 10;    fun(obj);    cout << x << endl;    fun1(obj);    cout << x << endl;    fun2(obj)    cout << x << endl;    return 0;}
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?
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?
Marketing
Mentor Graphics
Experienced
Interview Experiences
Writing code in comment?
Please use ide.geeksforgeeks.org,
generate link and share the link here.
Amazon Interview Experience for SDE1 (8 Months Experienced) 2022
Goldman Sachs Interview Experience for Technology Analyst (1.8 Years Experienced)
Amazon Interview Experience for System Development Engineer (Exp - 6 months)
FactSet Interview Experience (Off-Campus) 8 Months Experienced
Walmart Interview Experience for SDE-III
Amazon Interview Questions
Commonly Asked Java Programming Interview Questions | Set 2
Amazon Interview Experience for SDE-1 (Off-Campus)
Amazon AWS Interview Experience for SDE-1
Difference between ANN, CNN and RNN