Top "Time-complexity" questions

The time complexity of an algorithm quantifies the amount of time taken by an algorithm to run as a function of the size of the input to the problem.

Why not use hashing/hash tables for everything?

In computer science, it is said that the insert, delete and searching operations for hash tables have a complexity of …

algorithm data-structures hash time-complexity
Can an O(n) algorithm ever exceed O(n^2) in terms of computation time?

Assume I have two algorithms: for (int i = 0; i < n; i++) { for (int j = 0; j < n; j++) { //do …

big-o complexity-theory time-complexity
Time complexity of a Stack ADT implemented using a Linked List

What is the time complexity of the put(x) and get() functions for a Stack abstract data type that is …

pointers data-structures stack time-complexity abstract-data-type
Fuzzy matching deduplication in less than exponential time?

I have a large database (potentially in the millions of records) with relatively short strings of text (on the order …

algorithm duplicates time-complexity fuzzy record-linkage
Time complexity of this code to list all subsets of a set?

I have found numerous solutions across the web having O(2^n) complexity. Can someone help me figure out the time …

java big-o bit-manipulation time-complexity powerset
Memoization or Tabulation approach for Dynamic programming

There are many problems that can be solved using Dynamic programming e.g. Longest increasing subsequence. This problem can be …

algorithm recursion time-complexity dynamic-programming
Why is the runtime to construct a decision tree mnlog(n)?

When m is the amount of features and n is the amount of samples, the python scikit-learn site (http://scikit-learn.…

algorithm machine-learning big-o time-complexity decision-tree
A divide-and-conquer algorithm for counting dominating points?

Let's say that a point at coordinate (x1,y1) dominates another point (x2,y2) if x1 ≤ x2 and y1 ≤ y2; …

algorithm 2d big-o time-complexity divide-and-conquer
Which Procedure we can use for Maze exploration BFS or DFS

I know we can use DFS for maze exploration. But I think we can also use BFS for maze exploration. …

algorithm time-complexity depth-first-search breadth-first-search maze
O(n) of solution to solve boggle

What is the best time complexity O(n) of a function that solves boggle, where the boggle board is n …

algorithm time-complexity boggle