4
votes
2answers
2k views

InterviewStreet (Vertical Sticks) just a tip where to get started

Having a lot of trouble with this question in interviewstreet.com: Given array of integers Y=y1,...,yn, we have n line segments such that endpoints of segment i are (i, 0) and (i, yi). Imagine that ...