71

Having a fast and responsive app is orthogonal to “knowing your big Os”. Unfortunately, most tech companies over-emphasize algorithms in interviews and downplay systems knowledge, and I believe that’s one reason behind sluggish apps and bloated systems.

I’ve seen this play out repeatedly. Interviewers ask a LeetCode-style coding question, which is then followed by the ritual of discussing time and memory complexity. Candidates ace the answers. But then… their “real” code suffers from subtle yet impactful performance problems.

you are viewing a single comment's thread
view the rest of the comments
[-] affiliate@lemmy.world 17 points 1 year ago

O(n^2^) means that as the input n grows, it takes exponential time to process.

this is really pedantic, but O(n^2^) is quadratic, not exponential. the exponential runtimes are things like O(2^n^). when n gets even modestly big (say n=100), youre looking at a difference of 2^100^ ≈ 1.26×10^30^ vs 100^2^ = 10,000. this is just to say that exponential runtime is really in a class of its own.

but otherwise i think this was a pretty good explanation of the concept

this post was submitted on 09 Sep 2023
71 points (93.8% liked)

Programming

17314 readers
34 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



founded 1 year ago
MODERATORS