|
|
|
|
|
by Dylan16807
949 days ago
|
|
This isn't about picking N. This is saying "No matter what N you pick, your runtime will be smaller than roughly 2^[number of atoms in the reachable universe]" (Because if you hit the same state twice, you're stuck in a loop that will never halt.) So yes, your algorithm is bound by O(N^2), and that's the number that matters on practical computers... but it's also bound by O(1) with a stupidly large constant. So it's O(1). > I guess you're the kind of guy that chooses to uses not 8-bit bytes in an interview? Dude, I'm here specifically to argue against insisting on the exact literal meaning, and to choose the practical option. |
|