Algorithms, bin packing and sorting

Algorithms, bin packing and sorting Quiz

Spec 1.1–2 · Edexcel A-Level Further Maths: Quiz

Studying this course? Keep your progress in one place.

Pick an answer for each. Quizzes never use energy.

5 questions, one answer each

Each answer is checked as you go, with why.

See all 5 questions
  1. 1. What is the order of the bubble sort algorithm?

    • A. nn
    • B. n2n^2
    • C. log⁡n\log n
    • D. 2n2^n
  2. 2. Which describes first-fit decreasing?

    • A. Use first-fit on the items in the order given
    • B. Pack the biggest items one per bin
    • C. Find sets of items that exactly fill a bin
    • D. Sort the items into descending order, then use first-fit
  3. 3. Quick sort is used on a list of 6 items. Which position is the first pivot in?

    • A. 3rd
    • B. 4.5th
    • C. 4th
    • D. 5th
  4. 4. Items of total size 47 are packed in bins of capacity 10. What is the lower bound on the number of bins?

    • A. 5
    • B. 4
    • C. 4.7
    • D. 6
  5. 5. The list 5, 2, 4, 1 is sorted into ascending order using bubble sort. What is the list after the first pass?

    • A. 2, 4, 1, 5
    • B. 2, 4, 5, 1
    • C. 2, 1, 4, 5
    • D. 1, 2, 4, 5

Quiz