Theta Notation Examples || Lesson 13 || Algorithms || Learning Monkey ||
1 هزار بار بازدید -
2 سال پیش
-
Theta Notation ExamplesIn this class,
Theta Notation Examples
In this class, we will try to understand Theta Notation.
We have already discussed the concepts of Big O, Omega, and Theta Notations in our previous classes.
Theta Notation Examples
We have discussed in our previous class that theta notation represents the exact bound.
We will consider the example below to understand what the exact bound means.
The above example is an algorithm to find the maximum element in an array.
Let’s consider the array as shown below.
To find the maximum element from the above array, we have to compare all the elements in the array.
How many times we change the input or whatever may be the array size, the for loop will iterate all the n number of times (n means the array size). That means the algorithm will iterate exactly n number of times.
Whenever the algorithm efficiency can be “exactly” determined, those algorithms can be notated with theta notation.
For a better understanding, click the YouTube link provided on the top.
#algorithms #gatecse #learningmonkey #computerscienceengineering #competitivecoding #placementtraining
Link for playlists:
@learningmonkey
Link for our website: https://learningmonkey.in
Follow us on Facebook @ Facebook: learningmonkey
Follow us on Instagram @ Instagram: learningmonkey1
Follow us on Twitter @ Twitter: _learningmonkey
Mail us @ [email protected]
In this class, we will try to understand Theta Notation.
We have already discussed the concepts of Big O, Omega, and Theta Notations in our previous classes.
Theta Notation Examples
We have discussed in our previous class that theta notation represents the exact bound.
We will consider the example below to understand what the exact bound means.
The above example is an algorithm to find the maximum element in an array.
Let’s consider the array as shown below.
To find the maximum element from the above array, we have to compare all the elements in the array.
How many times we change the input or whatever may be the array size, the for loop will iterate all the n number of times (n means the array size). That means the algorithm will iterate exactly n number of times.
Whenever the algorithm efficiency can be “exactly” determined, those algorithms can be notated with theta notation.
For a better understanding, click the YouTube link provided on the top.
#algorithms #gatecse #learningmonkey #computerscienceengineering #competitivecoding #placementtraining
Link for playlists:
@learningmonkey
Link for our website: https://learningmonkey.in
Follow us on Facebook @ Facebook: learningmonkey
Follow us on Instagram @ Instagram: learningmonkey1
Follow us on Twitter @ Twitter: _learningmonkey
Mail us @ [email protected]
2 سال پیش
در تاریخ 1401/04/08 منتشر شده
است.
1,071
بـار بازدید شده