4 ms·
Leaping Years and Drawing Lines
- xirium 19y agoI certainly hadn't associated Bresenham's algorithm with leap year algorithms but it is a good explanation.
- bayareaguy 19y agoFor the gcd, I've always liked this version from python's own unit test: def gcd(a, b): while a: a, b = b%a, a return b