Top "Complexity-theory" questions

Computational complexity theory is a branch of the theory of computation in theoretical computer science and mathematics that focuses on classifying computational problems according to their inherent difficulty.

Explanation of Algorithm for finding articulation points or cut vertices of a graph

I have searched the net and could not find any explanation of a DFS algorithm for finding all articulation vertices …

algorithm graph complexity-theory graph-algorithm microsoft-distributed-file-system
Complexity of factorial recursive algorithm

Today in class my teacher wrote on the blackboard this recursive factorial algorithm: int factorial(int n) { if (n == 1) return 1; …

complexity-theory big-o factorial
Example of a factorial time algorithm O( n! )

I'm studying time complexity in school and our main focus seems to be on polynomial time O(n^c) algorithms …

algorithm complexity-theory time-complexity factorial
How to understand the knapsack problem is NP-complete?

We know that the knapsack problem can be solved in O(nW) complexity by dynamic programming. But we say this …

algorithm complexity-theory
Time complexity of node deletion in singly- and doubly-linked lists

Why is the time complexity of node deletion in doubly linked lists (O(1)) faster than node deletion in singly linked …

linked-list complexity-theory time-complexity singly-linked-list doubly-linked-list
Finding Big O of the Harmonic Series

Prove that 1 + 1/2 + 1/3 + ... + 1/n is O(log n). Assume n = 2^k I put the series into the summation, but I have …

time-complexity big-o complexity-theory
Why is bubble sort O(n^2)?

for (int front = 1; front < intArray.length; front++) { for (int i = 0; i < intArray.length - front; i++) { if (intArray[…

algorithm sorting complexity-theory big-o bubble-sort
Python dictionary keys. "In" complexity

Quick question to mainly satisfy my curiosity on the topic. I am writing some large python programs with an SQlite …

python dictionary hashmap complexity-theory big-o
Is Big O(logn) log base e?

For binary search tree type of data structures, I see the Big O notation is typically noted as O(logn). …

math binary-tree complexity-theory big-o
Priority Queue remove complexity time

What is the complexity (big-oh) for the remove() function on the Priority Queue class in Java? I can't find anything …

java complexity-theory time-complexity priority-queue