Hacker News new | past | comments | ask | show | jobs | submit login

In the Python example, wouldn't you need to make sure the x values from mapping are sorted, since dictionaries are unordered? Change, for x in mapping to for x in sorted(mapping)



Consider applying for YC's Spring batch! Applications are open till Feb 11.

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

Search: