CS210 Review

  • 1. time complexity
  • O(1) < O(log2n) < O(n) < O(nlog2n) < O(n^2) < O(2^n)

  • 2. sorting algorithm
  • Algorithm Worth Case space complexity
    Insert O(n^2) O(1)
    Select O(n^2) O(1)
    Bubble O(n^2) O(1)
    Quick O(nlog2n) O(nlog2n)
    Merge O(nlog2n) O(1)
    Heap O(nlog2n) O(1)

    3. Insert sort, Select sort, Bubble sort implement in c++

    Download

    4. Insert sort, Select sort, Bubble sort implement in c++

    Download

    5. Insert sort, Select sort, Bubble sort implement in c++

    Download