Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

My team uses this as a screening question, so I won't give you the answer - but you forgot to mention that both the rand5 and rand7 should have a uniform distribution. :)

I'll give you a hint, though - the solution is not elegant at all. Which is part of the point.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: