• JaddedFauceet@lemmy.world
    link
    fedilink
    arrow-up
    0
    ·
    2 months ago

    Likely they want a lower time complexity.

    for example a question can be trivially solved in O(n^2). but there is no know < O(n) solution, so they ask for O(n)

    • Tiefling IRL@lemmy.blahaj.zone
      link
      fedilink
      arrow-up
      1
      ·
      edit-2
      1 month ago

      Most of the time O(n^2) is optimized to O(n log n). You’ll get some sort of award if you can figure out a sorting function that runs in O(n).