Mentor Graphics Interview – Set 1

Company: Mentor Graphics

Technical Interview:

Q1. Questions related to the work done at my previous company.
Q2. Find if a given directed graph is cyclic or not.
Q3. You have a stream of bytes from which you can read one byte at a time. You only have enough space to store one byte. After processing those bytes, you have to return a random byte. Note: The probability of picking any one of those bytes should be equal.
Q4. Find if a given Binary Tree is BST or not.
Q5. Devise an algorithm to determine the Nth-to-Last element in a singly linked list of unknown length. If N = 0, then your algorithm must return the last element. You should parse the list only once.
Q6. Given an array of integers, print all possible permutations. Also explain your approach.
Q7. Design a Stack DS that also prints in O(1) the minimum element you pushed in the stack.
Q8. Given a linked list with loop, how would you find the starting point of the loop ?
Q9. Find a number a matrix mat[m][n] where all the rows and columns are sorted non-decreasingly. What will be the complexity of the solution.

Thanks Vineet Saxena for sharing your experience. If you would like to contribute, mail us your interview experience at [email protected] or write it here: Google Form . We will like to publish it on CrazyforCode and help other job seekers.

One Thought on “Mentor Graphics Interview – Set 1

  1. george on January 10, 2015 at 3:10 am said:

    Any hints or solutions to these questions?

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Post Navigation