Skip to content

martsokha/interviews

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

6 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Interview

Time & Space Complexity

Name Complexity Examples Notes
Constant O(1) Basic arithmetics
Logarithmic O(log n) Binary search, balanced tree height
Linear O(n) Linear search, non-comparison sort
Linearithmic O(n log n) Comparison sort also known as Quasilinear
Quadratic O(n^2)
Cubic O(n^3)
Exponential O(2^n) Backtracking (all subsets)
Factorial O(n!) Backtracking (all permutations)

Array

Graph

Binary Tree

Binary Search Tree

Binary Search

String

Trie

Matrix

Math

Binary

Stack

Heap

Recursion & Backtracking

  • Any distinct subset of size K from a set of N elements is a valid combination.
  • Any distinct element arrangement of size N from a set with N elements is a valid permutation.

Linked List

Queue

Hash Table

Greedy

Dynamic Programming

About

Solutions for common Data Structures and Algorithms interview questions.

Topics

Resources

License

Stars

Watchers

Forks