Reputation: 165
Hi guys Can you explain to me this in simple words
Upvotes: 0
Views: 900
Reputation: 341
The worst-case is the one on which your algorithm requires the biggest number of operations. So, if you use this solution on some input data, then the worst-case complexity will give the upper bound i.e. it won't be worse than this. On the other hand, the best-case tells that your algorithm won't be better on any input data.
The average case gives you the average complexity of operations, when running on many samples of input data.
Upvotes: 1