Real-world example of exponential time complexity

后端 未结 5 2012
南笙
南笙 2021-01-30 04:09

I\'m looking for an intuitive, real-world example of a problem that takes (worst case) exponential time complexity to solve for a talk I am giving.

Here are examples for

5条回答
  •  北海茫月
    2021-01-30 04:51

    • O(10^N): trying to break a password by testing every possible combination (assuming numerical password of length N)

    p.s. why is your last example is of complexity O(infinity) ? it's linear search O(N) .. there are less than 7 billion people in the world.

提交回复
热议问题