What is Big O notation? Big O notation in Algorithm Analysis and Time & Space Complexity Tutorial.
In this video, I will explain what is and why we use the big O notation when analyzing algorithms.
The usual practice in algorithm analysis is trying to find the time complexity of this algorithm. By the term time complexity we
determine the number of steps our algorithm takes depending on the input. We don't measure the exact time it takes in seconds because it would be different on every computer. So, we just take a look at number of operations and their relation to input.
Find me on different platforms!
GitHub: github.com/javacodingcommunity
Instagram: instagram.com/javacodingcommunity/
There are different kinds of complexities.
Let's say that you need to go over each element of a matrix.
What time complexity is that?
Well it's n * n so we write O(n squared ) and call this a quadratic complexity.
What if our algorithm just does one operation?
Like accessing one element from an array.
So, no matter the input size, we always do one operation.
That is called a constant complexity and we denote it as O(1).
Смотрите видео What is Big O Notation in Algorithm Analysis | Time & Space Complexity Tutorial онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь Java Coding Community 15 Октябрь 2020, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 653 раз и оно понравилось 19 людям.