• SmoothLiquidation@lemmy.world
    link
    fedilink
    English
    arrow-up
    25
    arrow-down
    1
    ·
    19 hours ago

    When you merge two sorted lists, you only have to compare the first element of each, since you can trust that all of the other elements are bigger. All the steps before that are there to make sure that is true.

    • IrateAnteater
      link
      fedilink
      English
      arrow-up
      11
      ·
      19 hours ago

      Wait, how do I know that all four of the right half aren’t smaller than all four of the Left half?