Hey folks!I just started learning recursion today — one of the most interesting topics in C++ — as part of the DSA with C++ cohort by ChaiCode. What is Recursion? Recursion is when a function calls itself, typically with a modified parameter in each ...
Time complexity is a technique employed to predict how long an algorithm will run given that the size of the input data is increased. It does not quantify time in seconds but rather in terms of how the number of operations is increasing. Suppose you'...
Imagine searching for a solution on stackoverflow you came across two solution one is of 2 lines another is 10 lines there is a great chance that you will pick the one with 2 lines. But wait that’s now always right. Understanding Time Complexity Tim...
From Linear to Quadratic Time Complexity Quadratic Equation Example: Let’s take this equation: f(n) = 2n² + 3n - 5 Now plug in a large value, like n = 3000: f(3000) = 2(3000)² + 3(3000) - 5f(3000) = 18,000,000 + 9000 - 5 = 18,008,995 As you can s...
Sure! Here's a beginner-friendly article on Time Complexity, explaining the concept in simple terms with examples: Understanding Time Complexity: A Beginner’s Guide If you’re new to programming, you’ve probably heard terms like “Big O”, “Time Comple...
“Writing 100 Lines of Code can be Better than just 2”. When I first listened to this line, I thought someone had gone crazy again, but after understanding the concept behind this statement, now I am also saying the same 😁 Before understanding this, ...
Today, I attended the first class of my DSA in C++ cohort by Hitesh sir and Pratik sir from #chaicode, and I learned something that completely changed how I think about writing code. We talked about a common mistake beginners make—Pratik sir talked a...
Why Writing 100 Lines of Code Can Be Better Than Just 2 When you're learning programming, or even after years of experience, there's always a temptation to write code that's short and clever. It feels cool to solve a problem in just 2 lines. But some...