Hacker News new | ask | show | jobs
by user2994cb 3509 days ago
That's nice. Here's a (recursive) Python implementation:

http://ideone.com/z1sUp4