Top "Big-o" questions

The Big-O notation is used to represent asymptotic upper bounds.

Are there any O(1/n) algorithms?

Are there any O(1/n) algorithms? Or anything else which is less than O(1)?

theory complexity-theory big-o
Example of O(n!)?

What is an example (in code) of a O(n!) function? It should take appropriate number of operations to run …

java algorithm big-o complexity-theory factorial
Why is the complexity of computing the Fibonacci series 2^n and not n^2?

I am trying to find complexity of Fibonacci series using a recursion tree and concluded height of tree = O(n) …

algorithm recursion big-o fibonacci
Given an array of positive and negative integers, re-arrange it so that you have positive integers on one end and negative integers on other

I recently came across a Microsoft Interview Question for Software Engineer. Given an array of positive and negative integers, re-arrange …

arrays algorithm sorting language-agnostic big-o
Why is inserting in the middle of a linked list O(1)?

According to the Wikipedia article on linked lists, inserting in the middle of a linked list is considered O(1). I …

linked-list big-o
Big O, what is the complexity of summing a series of n numbers?

I always thought the complexity of: 1 + 2 + 3 + ... + n is O(n), and summing two n by n matrices would be O(…

performance algorithm optimization complexity-theory big-o
Big O notation Log Base 2 or Log Base 10

When articles/question state that the Big O running time of the algorithm is O(LogN) . For example Quicksort has …

algorithm big-o logarithm
Solving the recurrence relation T(n) = √n T(√n) + n

Is it possible to solve the recurrence relation T(n) = √n T(√n) + n Using the Master Theorem? It is …

math recursion complexity-theory big-o recurrence
Could anyone explain Big O versus Big Omega vs Big Theta?

Possible Duplicate: Big Theta Notation - what exactly does big Theta represent? I understand it in theory, I guess, but …

big-o discrete-mathematics