Interview Questions For All

Interview Questions For All Who Are Waiting For Jobs

Thursday, July 24, 2008

Yahoo Interview Questions-2


# Design a data structure such that given a stream of numbers, you can find the maximum of the numbers at any point and also all the numbers.


# Given an array of 1s and 0s arrange the 1s together and 0s together in a single scan of the array. Optimize the boundary conditions.

# Find the common ancestor of two given nodes in a binary tree, how do you exploit the properties of a given BST for the same problem.

# Given a function getsort(data),that sorts the data given. The function sorts in place and does not use any extra memory. How do you validate the function with respect to 1)it sorts 2) it does not use extra memory

# Explain the Traveling Salesman problem? What is an NP-complete problem? What is the Hamiltonian cycle problem?

# Find out the least common ancestor in a binary tree.
piot at 9:24 AM

No comments:

Post a Comment

‹
›
Home
View web version
Powered by Blogger.