Find missing numbers in sequences | Optiver Coding Question