Can some help me with a function which is Big O(1) but not Ω(1) and the other way around? Some explanation would greatly he开发者_JAVA百科lp.
Big-O means <= and big Omega means >=, so a function that is O(1) but not Omega(1) is f(n) = 1/n. For the other way around, f(n) = n works.
精彩评论