| FazBrowse Wikipedia Viewer | Main Page | | |
| Viewing: https://en.wikipedia.org/wiki/Randomized_algorithm |
| Part of a series on | |
| Probabilistic data structures | |
|---|---|
| Random trees | |
| Related | |
| findingA_LV(arrayA,n)
begin
repeat
Randomlyselectoneelementoutofnelements.
until'a'isfound
end
This algorithm succeeds with probability 1. The number of iterations varies and can be arbitrarily large, but the expected number of iterations is
|