Learnings
Home
  • README
  • Use headings to create page groups like this one​
    • Grokking Algorithms
      • Chapter 1
      • Chapter 2
      • Chapter 3
      • Chapter 4
Powered by GitBook
On this page
  1. Use headings to create page groups like this one​
  2. Grokking Algorithms

Chapter 1

  • A notation that tells us how fast an algortihm is.

  • It's a measures the fastness of algorithm in terms of operations (not in seconds).

  • Big O denotes worst case run time.

Big O notation: O(n) -> Here n stands for the number of operations.

Example

Notation
Example

O(log n)

Binary Search

O(n)

Simple search

O(n.log n)

Quick Sort

O(n2)

Selection sort

O(n!)

The traveling salesperson

PreviousGrokking AlgorithmsNextChapter 2

Last updated 11 months ago