logoalt Hacker News

hujun236 • today at 2:51 AM • 0 replies • view on HN

The part I like is starting from the count rather than count-1. If n is 0, `i --> 0` never enters. Do `size_t i = n - 1` and a zero-length array wraps to SIZE_MAX first, which is the case that actually runs off the front.