• Shuffle
    Toggle On
    Toggle Off
  • Alphabetize
    Toggle On
    Toggle Off
  • Front First
    Toggle On
    Toggle Off
  • Both Sides
    Toggle On
    Toggle Off
  • Read
    Toggle On
    Toggle Off
Reading...
Front

Card Range To Study

through

image

Play button

image

Play button

image

Progress

1/17

Click to flip

Use LEFT and RIGHT arrow keys to navigate between flashcards;

Use UP and DOWN arrow keys to flip the card;

H to show hint;

A reads text to speech;

17 Cards in this Set

  • Front
  • Back

complexity of linear loop

O(N)

complexity of binary search

O(logN)

complexity of Hash Map add() method

O(1)

complexityof Linked List findNth() method

O(N)

complexity of Array findNth() method

O(1)

complexity of Priority Queue insert() method

O(logN)

complexity of Heap findMax() method

O(1)

complexity of selection sort

O(N^2)

complexity of insertion sort

O(N^2)

complexity of heap sort

O(NlogN)

space complexity of merge sort


timecomplexity of merge sort

O(N)


O(NlogN)

space complexity of quick sort


time complexity of quick sort

O(logN)


O(NlogN)

what is next step for this selection sorting?


3 5 1 2 4

1 5 3 2 4

what is next step for this insertion sorting?


3 7 9 4 8

3 7 4 9 8

merge sort is a stable algorithm. what does it mean? in which case is it important?

maintain the order of the elements before the sorting. it is important for sorting more than 1 criteria (ie. email date and author).

what is the best case of insertion sort?

when the list is already somewhat sorted

what did quick sort do before it starts its sorting process?

it shuffles the list first. note that this shuffling makes quick sort an unstable algorithm.