What is :
- by how much
- to how much
efficiency of algorithm is increased , if
Initially it was executing in 20 seconds, after improvement (Final Time) it is executing only in 5 seconds. My Try:
1. by how much : (Initial Time - Final Time)
--------------------------- * 100
Initial Time
2. to how much : Initial Time
------------- * 100
Final Time
tell me if i'm wrong?
You've got the right idea, and perhaps I'm splitting hairs, but I think we could also swap the equations:
That is, the improvement increases performance by $$\frac{\text{initial time}}{\text{final time}}\times 100\% = 400\%.$$
The change leads to a $$ \frac{\text{initial time} - \text{final time}}{\text{initial time}}\times 100\% = 75\%$$ improvement in performance.
(perhaps you can clarify exactly how "by" and "to" are to be understood)