merge sort

Cards (10)

  • merge sort is a sorting algorithm that works by breaking down the list into two sublists and then sorting each sublist into order
  • What sorting algorithm is being discussed?
    Bubble sort
  • What is the main process of bubble sort?
    • Compare adjacent items
    • Swap if out of order
    • Highest number moves to the right
    • Sorted partition forms at the end
  • What happens to the highest number during bubble sort?
    It bubbles to the right
  • What is the result after the first iteration of bubble sort?
    Nine is in the correct spot
  • What does the pseudocode for bubble sort indicate about its structure?
    • It uses a nested for-loop
    • Indicates multiple iterations
    • Each iteration compares elements
  • What is the worst-case time complexity of bubble sort?
    Big O of n2n^2
  • What does the variable nn represent in the time complexity?

    Size of the array
  • What should you do if you have questions about bubble sort?
    Ask them below
  • What is the final outcome of the bubble sort algorithm?
    The array is sorted