Download presentation
Presentation is loading. Please wait.
Published byDarrell Barnett Modified over 6 years ago
1
Big O: Make it Simple Determine how complex the algorithm is, in relative to the size of the problem (e.g: List to be sorted) 'O' Stands for 'Order' - E.g: This algorithm costs an 'order' of X to run The size of the problem In sorting list problem, the size of the problem is the length of the list The Big O expresses how complex is the algorithm in relative to the length of the list to be sorted. Usually, the length is replaced with 'N' E.g: O (Log N)
2
Bubble-Sort Example The number of operations needed to sort the
Size = 5 Number of Operations = 24 The number of operations needed to sort the list with bubble-sort grows much faster than the size of the list!!
3
Big O: Make it Simple - If you double the size of the list;
→ The number of operations = = 4 - If you triple the size of the list; → The number of operations = = 9 So, the Big (O) notation becomes : O (N*N) What happens when the size of the list goes infinity??? What will happen to the number of operations?? 2 2 3 2
4
Big O: Made it Simple
5
Big O: Make it Simple
6
Big O: Make it Simple
7
Big O: Make it Simple
8
Big O: Make it Simple
9
Big O: Make it Simple
10
Big O: Make it Simple
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.