002 Big O Worst Case by @garibenotokonoko on 3Speak
Java Data Structures & Algorithms + LEETCODE Exercises | Big O --- ▶ Watch on 3speak.tv
Tags: #java
So when dealing with time and space complexity, you will see these three Greek letters. They are Omega, Theta, and Omicron. Omicron is better known as O, as in Big O. And to show how we use these, I'm going to bring up an array, and say we're going to use a for loop to loop through this array. So when we're looking at how many times that we have to run the four loop, our best case would be if we're looking for the number 1. Our worst case would be if we were looking for the number 7, and our average case would be if we were looking for the number 4. So this best case with the number 1, for that we use omega. For the average case, we use the Greek letter theta, And for our worst case, we use the Greek letter Omicron or O. So one of the things people will say when you talk about your Big O being a particular time complexity is they'll say things like, yeah, but what is your average Big O or your best case Big O? Well, technically, there is no average case or best case big O. Average case would be Theta and Best case would be Omega. but you will hear people use it in that way. But technically, Big O is always worse case.