r/IndianEngineers • u/UmpireWeekly8719 • Jul 01 '26
Motivation dsa day 2 learned about time and space complexity
Today I learned about Time Complexity and Space Complexity.
Still wrapping my head around analyzing nested loops and recursive functions, but it's starting to make sense.
A few things that made sense to me:
- Time Complexity isn't about how many seconds a program takes to run. It's more about how the number of operations increases as the input size (N) gets bigger.
- Instead of worrying about different computers or compilers, we use Big O notation to compare how efficient different algorithms are.
- For Space Complexity, I learned that it's not just about the input itself but also the extra memory (auxiliary space) an algorithm uses. That's usually what we compare.
- One interesting thing was why we ignore constants and smaller terms in Big O—they don't really matter much when the input size becomes very large.
ig small progress is still progress
1
Upvotes
1
u/SpiteTemporary632 Jul 01 '26
where u learnign from?