In this challenge you are supposed to fill a grid 10x10 with numbers from 1 to 100 (each number once) following this rules:
- Number 1 must be on the bottom row
- Number 100 must be on the upper row
- Two consecutive numbers must be one next to the other (diagonals doesn't count)
- The grid must be random
It's not necessary at all that all possible outcomes are equiprobable. Still, though, there must be a non-zero chance for every possible grid (that satisfies the first 3 conditions) to occur.
I don't want time to be a problem, but to avoid pure brute force, answers should take less than a minute to run.
Since output shouldn't be the main focus of the challenge I give complete freedom on how to write it, as long as each row in the output corresponds to a row in the grid and numbers are separated by a character (of any kind).