Open In App

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

Improve
Improve
Like Article
Like
Save
Share
Report

For Noida Location

F2F Round 1(2hrs):

  1. What are virtual functions and virtual destructors?
  2. What do mean by static keyword?
  3. Difference between pointers and memory reference?
  4. 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.
  5. 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.
  6. 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|
  7. Detect cycle in a directed and undirected graph.
  8. Find errors and output of the program

    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;
    }

    
    

  9. Difference between new and malloc.

F2F Round 2(2hrs):

  1. Difference between map and unordered map.
  2. What is a static keyword? How can we use non-static variables in static function?
  3. What is BST and what is the time complexity of searching an element in an array?
  4. Given a matrix of size m*n. Traverse the matrix in spiral form.
  5. convert roman numbers to decimal numbers.
  6. What are templates and write a syntax for declaring a generic class?
  7. 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.
  8. Puzzle | Measuring Block (https://www.geeksforgeeks.org/puzzle-measuring-block/)
  9. Write an algorithm to find a kth minimum element from a BST.
  10. What are storage classes?

Last Updated : 06 Aug, 2021
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads