• sizeoftheuniverse@programming.dev
    cake
    ·
    8 months ago

    They force you think of o(n) and train you better than anything else on how to write your functions (but not how to organise them).

    I have around 600 leetcode exercises solved, and there's a big difference in skill between the person i was before leetcode and the person i am now.

    • lysdexic@programming.dev
      ·
      8 months ago

      They force you think of o(n) and train you better than anything else on how to write your functions (but not how to organise them).

      I agree. I think it's all about blind spots. A software engineer spends most of the time reading code, and the changesets they write most of the time are not algorithms or any fancy iteration beyond doing a vanilla for loop over a collection. leetcode-type exercises tend to invert that tendency, and present us with challenges which we would only rarely tackle. It's a good exercise in the sense that it forces a type of usecase we don't often use. Still, their practical usefulness beyond coding crossword puzzles is very limited.