Day-2 (Space Complexity)
As I continue my coding challenge journey, exploring space complexity has helped me understand how computer programs use memory. Space complexity is like a measuring stick for how much memory an algorithm needs to work. It's not just about the storage space for the data you put in (like numbers or words), but also the extra space an algorithm uses while it's running.
By looking into space complexity, I'm learning how to make programs that use memory more efficiently. It's like figuring out how to use just the right amount of space to get the job done without wasting any. Understanding this helps me create better, faster programs that don't take up unnecessary memory. It's all about finding a balance between using the space needed for the input and the extra space while keeping things running smoothly for example-:
Input(a)//taking input of a
Input(b)//taking input of b
c = a+b//here c is auxilary space that we use to solve a problem