Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on GCD and the magic of subtraction. Parent comment
It can't be negative because you cheat and always put "larger - smaller". See your own example: you go:
13 - 7 = 6 -> 7 - 6 = 1 a - b = c -> b - c = d
6 - 1 = 5 -> 5 - 1 = 4 a - b = c -> c - b = d
There are no comments on this comment yet.
It can't be negative because you cheat and always put "larger - smaller". See your own example: you go:
But then then you do: Which switches the order. What if you don't?