Yahoo Interview Report
- 0of 0 votes
AnswersFind the missing element in a sorted array in most optimum running time (O(log n))
- gullu September 12, 2010| Report Duplicate | Flag | PURGE
Yahoo Software Engineer / Developer Algorithm - 0of 0 votes
AnswersWrite a function to find intersection of two arrays?
- gullu September 12, 2010| Report Duplicate | Flag | PURGE
Yahoo Software Engineer / Developer Algorithm - 0of 0 votes
AnswersGiven n non overlapping intervals and an element. Write a program to find the interval into which this
- gullu September 12, 2010
element falls.| Report Duplicate | Flag | PURGE
Yahoo Software Engineer / Developer Algorithm - -2of 2 votes
AnswersGiven a linked list with the following property node2 is left child of node1, if node2 < node1 else, it is the right child.
- gullu September 12, 2010
O P | | O A | | O B | | O C How do you convert the above linked list to the form without disturbing the property. Write C
code for that. O P | | O B / \ / \ / \ O ? O ? determine where do A and C go| Report Duplicate | Flag | PURGE
Yahoo Software Engineer / Developer Algorithm - 0of 0 votes
AnswersWrite a function which takes as parameters one regular expression (only ? and * are the special characters)
- gullu September 12, 2010
and a string and returns whether the string matched the regular expression.| Report Duplicate | Flag | PURGE
Yahoo Software Engineer / Developer Algorithm - 0of 0 votes
AnswersRemove duplicates from a linked list
- gullu September 12, 2010| Report Duplicate | Flag | PURGE
Yahoo Software Engineer / Developer - 0of 0 votes
AnswersYou are given some denominations of coins in an array (int denom[])and infinite
- gullu September 12, 2010
supply of all of them. Given an amount (int amount), find the minimum number of coins required to get
the exact amount. What is the method called?| Report Duplicate | Flag | PURGE
Yahoo Software Engineer / Developer Algorithm - 0of 0 votes
AnswersYou are given: 3 types of vehicles: Motorbike, Car, and a special type of car for the handicapped.
- gullu September 12, 2010
3 types of parking: Motorbike parking, Car parking, handicapped car parking.
Motorbikes and cars can only park in their designated parkings, while the handicapped cars can park either in their own parking or the
regular car parking.
How would you model this as classes? Explain your methods.| Report Duplicate | Flag | PURGE
Yahoo Software Engineer / Developer Algorithm - 0of 0 votes
AnswersAn array of size n, has n/2 unique elements and n/2 occurences of an element. Find the
- gullu September 12, 2010
non-unique element in linear time?| Report Duplicate | Flag | PURGE
Yahoo Software Engineer / Developer Algorithm - 0of 0 votes
AnswersThere are four dogs, each at the counter of a large square. Each of the dogs begins chasing the dog
- gullu September 12, 2010
clockwise from it. All of the dogs run at the same speed. All continously adjust their direction so that
they are always heading straight towards their clockwise neighbor. How long does it take for the dogs to
catch each other? Where does this happen? (Hint: Dog’s are moving in a symmetrical fashion, not along the
edges of the square).| Report Duplicate | Flag | PURGE
Yahoo Software Engineer / Developer Brain Teasers - 0of 0 votes
AnswerGiven a balanced BST tree, write a function to replace the root with a node that belongs to the original tree.
- gullu September 12, 2010| Report Duplicate | Flag | PURGE
Yahoo Software Engineer / Developer Algorithm - 0of 0 votes
AnswersThere is a blank disc. You are given two colors of paint (black and white) . A sensor can recognize the color
- gullu September 12, 2010
painted on the disc and produce an output. Paint the disc in a way such that you can find the direction of
rotation by looking at the output (BWBWBWBW... etc). Find the minimum number of sectors you will need to paint| Report Duplicate | Flag | PURGE
Yahoo Software Engineer / Developer Brain Teasers - 0of 0 votes
AnswersSortedIntersect: Given two sorted linked lists, create and return a new linked list that represents the intersection of the two
- gullu September 12, 2010| Report Duplicate | Flag | PURGE
Yahoo Software Engineer / Developer Algorithm - 0of 0 votes
AnswersGiven a linked list, split it into two lists - one for the front half and, one for the last half. If odd number of elements are
- gullu September 12, 2010
present the extra node should go to the front list| Report Duplicate | Flag | PURGE
Yahoo Software Engineer / Developer Algorithm - 0of 0 votes
AnswersDesign a stack which supports push, pop, min and max operations in O(1).
- gullu September 12, 2010| Report Duplicate | Flag | PURGE
Yahoo Software Engineer / Developer Algorithm