let\'s say we have an array with a size of n. I wanted to generate a random index i.e. in the range of [0, n - 1].
[0, n - 1]
Here is what most of people would do<