Design Snake Game
Keep a running summary of the numbers seen so far as a list of disjoint ranges, merging neighbours as they arrive. The visual draws the ranges on a number line and merges them as each value is added.
Keep a running summary of the numbers seen so far as a list of disjoint ranges, merging neighbours as they arrive. The visual draws the ranges on a number line and merges them as each value is added.