Yahoo Interview Questions-1

  1. A modified insertion sort uses binary search to find the position of insertion. What would be the improvement in order realized?

  2. class a{};
    count <<>
    What is the output?

  3. The linked list size is unknown and it is very large. Find out the N th element from the back end.

  4. What happens in the following code?
    char x[10],y[10];

  5. Design a stack which supports push, pop, min and max operations in O(1).

  6. Design an NFA to accept a string of 0s and 1s.

  7. Given a balanced BST tree, write a function to replace the root with a node that belongs to the original tree.

  8. Explain what this function does

    char *mystrcpy(char *s)
    char des=char [MAXLEN];
    char * t=des;
    return t;

  9. Given that you have a server hit by around 400 million users, and you have log files that contain the user ids of all of them. How do you find the frequency of login of each user. (The log files are very huge!!)

  10. Explain Polymorphism, Encapsulation, Inheritance, operator overloading?

1 comment:

  1. Good one. I think it's really helpful information. Thank you for sharing.

    Upcoming Bank Exams