Monday, 4 February 2013

Yahoo! Programming Test

Yahoo's technical test (at IIT-B, 2012 Placements) consisted of 25 objective questions and 2 coding questions. Total duration was around 1.5 hours. Objective questions mainly focused on Data Structures, Big-O, Sorting, C/C++ concepts and some general puzzles.

Coding test had the following 2 questions:

1) You have been given a triangle of numbers as shown below. You are supposed to start at the top and go to the base of the triangle by taking a path which gives the maximum sum. You have to print this maximum sum at the end. A path is formed by moving down 1 row at each step to either of the immediately diagonal elements. 

The path needed is 3->7->4->9 since it adds up to 3 + 7 + 4 + 9 = 23, which is the max possible value.

2) Given an array of strings, display all the strings that are not prefix of any other string in the array.
(Hint #1: Sorting; Hint #2: Trie)


  1. Good post!

    Do you want to work home-based? With internet access, Unemployed pinoys (UEP) can provide you a job where you can work at home and earn money while being able to spend time with your family or loved ones at home.

    Join us now at

  2. Lovely Website, Maintain the fantastic work. Thank you so much!
    Local Packers and Movers Ahmedabad list, Cheap Packers Movers Ahmedabad Charges, Affordable, Best Household Shifting Ahmedabad @ Packers and Movers Ahmedabad