Quest 9: Encoded in the Scales

  • Keep top level comments as only solutions, if you want to say something other than a solution put it in a new post. (replies to comments can be whatever)
  • You can send code in code blocks by using three backticks, the code, and then three backticks or use something such as https://topaz.github.io/paste/ if you prefer sending it through a URL

Link to participate: https://everybody.codes/

  • hadesOPM
    link
    fedilink
    arrow-up
    2
    ·
    1 month ago

    union find: nice! I was too lazy to use union find, so I brute forced merging of the families, it was fast enough :)

    • Pyro
      link
      fedilink
      arrow-up
      1
      ·
      27 days ago

      Yeah I’ve got the DSU algorithm ingrained because of the number of the times I had to practice it for coding rounds. I didn’t need to do path compression and union by rank either but might as well.

      • hadesOPM
        link
        fedilink
        arrow-up
        1
        ·
        27 days ago

        Wow, your interviews were tough. I was never asked anything even remotely this difficult.