I guess this would be considered a Las Vegas algorithm: <a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Las_Vegas_algorithm" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Las_Vegas_algorithm</a> § “Relation to Monte Carlo algorithms”