Big O complexity of common functions

  • 0

    I wanted to summarize what is the big o notation complexity of the most common algorithms. I am listing some algorithms and what i think about complexity, please correct me if needed

    permutations of array--> O(N!)
    combinations of array-->O(N!)
    all possible subsets-->O(2^n)
    combination of phonenumber ->o(3^n)

Log in to reply

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.