Thinking in code · Working through a list

The biggest

The top score, the hottest day and the most expensive item all come from one pattern: keep the best value seen so far.