Find a function $f(n)$ such that neither $f(n) = O(log n)$ nor $f(n) = \Omega(n)$ holds.

150 Views Asked by At

Any hints on this problem?

I want to find a function $f(n)$ which is:

  • NOT $f(n) = O(log n)$
  • NOT $f(n) = \Omega(n)$

So it must hold that: $c_1 * log n < f(n) < c_2 * n$ and $c_1, c_2$ are some constants...

So I am looking for something which is smaller than $n$...can I say that $f(n) = 2 * n$?

1

There are 1 best solutions below

4
On

$h(n)=\sqrt{n}$ would be a good example.