Time Complexity:Time complexity is a measure of how long an algorithm takes to run based on the input size. It helps us understand how the running time grows as the input size increases.
Space Complexity: Space complexity refers to the amount of memory or storage space required by an algorithm during its execution. It helps us analyze how much memory an algorithm needs as the input size increases.
Big O Notation: Big O notation is used to describe the upper bound or worst-case scenario for time or space complexity. It allows us to compare algorithms and understand their scalability.