3 ms·
Fascinating. In fact by devoting half of its time to the first algorithm, a quarter to the second, and so on, it will solve it in the same big-O as the most ef
by btilly 10y ago
Fascinating. In fact by devoting half of its time to the first algorithm, a quarter to the second, and so on, it will solve it in the same big-O as the most efficient algorithm! (Albeit with a horrible constant.)
That said, this algorithm does not solve the decision problem because it can never return a no. Only a yes if there is one to be found.