What is time complexity?
๐ก Model Answer
Time complexity describes how the running time of an algorithm grows relative to the size of its input. It is expressed using Big O notation, which captures the upper bound of the growth rate. For example, a linear search has O(n) complexity because it may examine each of the n elements once. A binary search on a sorted array has O(log n) complexity because it repeatedly halves the search space. Time complexity helps developers compare algorithms, predict performance, and make informed design choices.
This answer was generated by AI for study purposes. Use it as a starting point โ personalize it with your own experience.
๐ค Get questions like this answered in real-time
Assisting AI listens to your interview, captures questions live, and gives you instant AI-powered answers โ invisible to screen sharing.
Get Assisting AI โ Starts at โน500