0

I'm trying to order the following functions in terms of Big O complexity from low complexity to high complexity: 4^(log(N)), 2N, 3^100, log(log(N)), 5N, N!, (log(N))^2

This:

  1. 3^100
  2. log(log(N))
  3. 2N
  4. 5N
  5. (log(N))^2
  6. 4^(log(N))
  7. N!

I figured this out just by using the chart given on wikipedia. Is there a way of verifying the answer?

Steve Ruble
  • 3,875
  • 21
  • 27
user1411893
  • 608
  • 2
  • 8
  • 19
  • This sort of question probably works better on cstheory.stackexchange.com, as it's not about programming. – Wooble Sep 28 '12 at 17:08

1 Answers1

1
3^100 = O(1)
log log N = O(log log N)
(log N)^2 = O((log N)^2)
N, 2N, 5N = O(N)
4^logN = O(e^logN)
N! = o(N!)

you made just one small mistake. this is the right order.

Ionut Hulub
  • 6,180
  • 5
  • 26
  • 55