3 ms·
Agreed - I was laughing as I was writing some of my code because it was so bad. These sort of questions are designed around algorithm design, but a one-off prob
by danielsoneg 16y ago
Agreed - I was laughing as I was writing some of my code because it was so bad. These sort of questions are designed around algorithm design, but a one-off problem with these small of sample sets doesn't need an elegant solution - a hatchet job does just fine. I'm not a CS grad and my math skills are a bit iffy, but I was able to solve all three challenges in a pretty reasonable amount of time.