Although this Las Vegas Algorithm is guaranteed to find the correct answer, it does not have a fixed runtime; due to the randomization (in "line 3" of the above code), it is possible for arbitrarily much time to elapse before the algorithm terminates.