Best Tech Interview Question I've Seen
I'm a curator of tech interview questions. I'm starting to work with our HR group on a tech recruiting strategy, so I've been looking for more questions. I got an email from a recruiter via a New York Java Meetup group (which is free). The email, of course describes the job requirements, but the best part of the email was the following section:By starting at the top of the triangle and moving to adjacent numbers on the row below, the maximum total from top to bottom is 27. 5
4 6 8
0 7 1 5 I.e. 5 + 9 + 6 + 7 = 27. Write a program in a language of your choice to find the maximum total from top to bottom in triangle.txt, a text file containing a triangle with 100 rows. Send your solution and resume to [123456 AT yodle dot com], replacing 123456 with the maximum sum for the triangle.
I had to try to solve the puzzle to see what they did. I tried my first solution, and got my mail bounced back to me... I got immediate feedback from a "unit test." My second solution didn't work either. My third worked... I'm down to 5 lines of Groovy that take about 150 ms.
Yodle had a great job posting. Note: I don't work for Yodle, so if you want to speak with them, you'll have to figure out their culture. On the other hand, if you want a similar culture (at least in part of our HUGE company - SunGard is #380 on the fortune 500), and want to work in a variety of projects, you can always email me. If you can solve this puzzle (and possibly have some finance experience), the interview process will probably just a formality .email me for that as well.</sales_pitch>
(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)