I stumbled upon Spotify puzzle page while checking out their jobs page. I love Spotify and working for them would be cool. But they only want submision based on Python, C++ or Java.<p>I wrote one in ruby still. Not much of an implementation but I did it as proper as I could.<p>Any comment on how I can improve the code is appreciate.<p>P/S: I don't know the etiquette here at Hacker News. Especially with regards to posting submission like this. Tell me if I violate any kind of code of conduct or anything.