Check out a free preview of the full Four Semesters of Computer Science in 5 Hours course:
The "Finding the Big O of Your Functions" Lesson is part of the full, Four Semesters of Computer Science in 5 Hours course featured in this preview video. Here's what you'd learn in this lesson:

Brian demonstrates how to calculate Big O on a few functions. When a loop is present, the Big O value is typically related to the number of iterations required by the loop or the number of nested loops. If a function simply returns a value without any iteration, the function would have a Big O value of 1 or “constant time”.

Get Unlimited Access Now