What is worst case running time ? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 11

What is worst case running time ?

28th Feb 2018, 7:38 AM
Ananya Srivastava
Ananya Srivastava - avatar
3 Answers
+ 6
Thanks 4 the rply
22nd Mar 2018, 6:38 AM
Ananya Srivastava
Ananya Srivastava - avatar
28th Feb 2018, 8:15 AM
Chrizzhigh
Chrizzhigh - avatar
+ 1
The worst case would be infinity. But I guess you want to know something about the worst case scenario with actually getting a result. A worst case is when your algorithm gets the worst input possible and therefore determines the maximum time it takes to solve a problem. The opposite would be the best case which takes the shortest time. Usually when analysing an algorithm you look at the average and worst case to determine the average and maximal runtime. This measurement of estimated time taken is called time-complexity. On Wikipedia you can find some examples for different algorithms: https://en.m.wikipedia.org/wiki/Best,_worst_and_average_case#Examples
28th Feb 2018, 8:25 AM
Alex
Alex - avatar