Article snapshot taken from Wikipedia with creative commons attribution-sharealike license.
Give it a read and then ask your questions in the chat.
We can research this topic together.
Indexed search, also called the cutpoint method, is an algorithm for discrete-distribution pseudo-random number sampling, invented by Chen and Asau in 1974.
References
Ripley
Fishman
Sources
Chen, H. C.; Asau, Y. (1974). "On Generating Random Variates from an Empirical Distribution". AIIE Transactions. 6 (2): 163–166. doi:10.1080/05695557408974949.
Fishman, G.S. (1996) Monte Carlo. Concepts, Algorithms, and Applications. New York: Springer.
Ripley, B. D. (1987) Stochastic Simulation. Wiley. ISBN0-471-81884-4