Algorithm and Data Structure

  1. Algorithm
    1. Hash table
      1. point: map input to key
    2. Heap
      1. Q. How to have 5 biggest numbers?
    3. Big O: efficiency, speed
      1. Insertion to linked list(normally only knows what comes after self)
        1. On
      2. Insertion to array list
        1. On^2
          1. because you need to make the elements after the insertion element move
  2. Sorting
    1. Bubble sort
  3. Difference between heap and queue
    1. Queue: FIFO
      1. network
    2. heap: LIFO
      1. programming. main-> function -> local