interview questions shared by candidates
Out of 25 horses, pick the fastest 3 horses. In each race, only 5 horses can run at the same time. What is the minimum number of races required?
See: http://www.huffingtonpost.com/2010/12/30/job-interview-questions_n_802658.html#s217050&title=Bloomberg_LP_Financial Please note you are only allowed to use the ordering of the horses finishes, there is no time clock.
Given a string of words and a maxWidth, write a method that inserts new lines where appropriate to perform a word-wrap. (Wrap on word boundaries, assume " " is fine). Now, how does your implementation handle string with multiple spaces between words ... Are those extra spaces lost or preserved?