1.6 Classes of functions

1.6 Classes of functions

Understanding Time Complexity

Types of Time Complexities

  • The discussion begins with an overview of various time complexities, starting with constant time complexity, denoted as O(1). This indicates that the execution time remains constant regardless of input size.
  • It is emphasized that even if a function's output is a large number (e.g., 2, 5, or 5000), it still qualifies as constant time complexity since it does not depend on the size of the input (n).
  • The next type discussed is logarithmic time complexity (O(log n)), which can be based on different logarithm bases. This complexity suggests that the algorithm's performance improves significantly as input size increases.
  • Moving forward, linear time complexity (O(n)) is introduced. Examples include functions like f(n) = 2n + 3 and f(n) = n/5000 + 6, all classified under linear due to their degree being one.
Playlists: Algorithms
Video description

classes of time and space functions Courses on Udemy ================ Java Programming https://www.udemy.com/course/java-se-programming/?referralCode=C71BADEAA4E7332D62B6 Data Structures using C and C++ https://www.udemy.com/course/datastructurescncpp/?referralCode=BD2EF8E61A98AB5E011D C++ Programming https://www.udemy.com/course/cpp-deep-dive/?referralCode=E4246A516919D7E84225