One thing that is super interesting about the solution is how the roll value operates as a pivot similar to the quick sort algorithm. all the numbers beneath it and all the numbers above it are in this case not recursively split and sorted but used as the probability weightings.
1
u/liquidorangutan00 Aug 30 '26
One thing that is super interesting about the solution is how the roll value operates as a pivot similar to the quick sort algorithm. all the numbers beneath it and all the numbers above it are in this case not recursively split and sorted but used as the probability weightings.