CS 1371

  1. Big O notation for insertion sort
    O(N.^2)
  2. which sort uses iteration and puts new vector in proper order with respect to items already put there?
    Insertion Sort
  3. which sort is this?

    if vec(i) < ret(j)
    ret = [ret(1:j-1), vec(i), ret(j:end)];
    insertion sort
  4. Big O notation for bubble sorting?
    O(N.^2)
  5. which sort uses iteration and swaps?
    bubble sort
  6. this code describes which sort?

    if vec(j) > vec(j+1)
    tmp = vec(j+1);
    vec(j+1) = vec(j);
    vec(j) = tmp;
    bubble sorting
  7. when does the worst case of quick sort take place?
    when the vector is already sorted.
  8. what is the big O for quick sort?
    O(N*log(N))
  9. which sort uses recursion with logical indexing?
    quick sort
  10. which sort method does this code describe?

    A= vec(1);
    down= vec(vec < pivot);
    up= vec(vec > pivot);
    one= vec(vec == pivot);
    ret = [black(down), one, black(up)];
    quick sort
  11. what is the big O for merge sort?
    O(N*log(N))
  12. which sort method uses recursion and cuts the vector in half?
    merge sort
  13. which sort method is described by this code?

    A =black(vec(1:round(end/2)));
    B = black(vec(round(end/2)+1:end));
    ret = black(A, B);
    merge sort
  14. units of fs?
    samples / seconds
  15. units for duration?
    seconds
  16. units for s
    samples
  17. what is the max frequency you can represent ?
    fs / 2
  18. how would you find out how many seconds were between consecutive time intervals?
    1 / fs
Author
sberninghaus3
ID
16008
Card Set
CS 1371
Description
CS 1371
Updated