Why Is Finding Complexity Of Algorithms Important In Practical Scenarios?

The obvious answer that comes is for optimizing the algorithm. Complexity helps us determine how much time & space is utilized by the algorithm for execution.

Can someone share how complexity of algorithms helps in practical programming situations? Share examples.

Replies

  • Pensu
    Pensu
    Isn't it obvious. I mean you can make a program using 100kb space, but if it can produce same result in 80kb then its better as it saves space. Using the same thing you can say if a solution can provide the result in 80ms than a solution which generates the result in 100ms, the first one is better. We always want to save space and time, as both of them cost a lot...😉. I think a programmer should try to minimize both of them.
    I guess the main question is how to prioritize them, sometime a better time complexity needs more space. Now its tough decide where to compromise.

You are reading an archived discussion.

Related Posts

In an array of integers,find the subarray that has the greatest value when all of its elements are summed together. Note that because some elements of the array may be...
Write a function that takes a string and returns the ROT13 version of the string; you may assume that the character set is ascii. What is the meaning of “Cebtenzzvat...
In a typical HR interview, you might be asked to differentiate between Confidence and Overconfidence. Can you list a few points?
I need your help..i am doing BE(ece),i finished my first year with 9.2 gpa..then entered into our department..in my mind there is only one thing that came into my mind...
This comes as a tricky question for many. How would you answer if the interviewer asks you, "Aren't you over qualified for this job profile?"