Which of the following is a limitation of time complexity analysis?
It doesn't consider the hardware on which the algorithm will run
It's only relevant for algorithms processing numerical data
It always provides the exact runtime of an algorithm
It can't be applied to algorithms with nested loops
What does an algorithm with a time complexity of O(n) signify?
The runtime increases linearly with the input size
The runtime is unpredictable
The runtime increases exponentially with the input size
The runtime is constant regardless of input size
Which of the following operations typically represents constant time complexity, O(1)?
Finding the smallest element in a sorted array
Inserting an element at the beginning of a linked list
Sorting an array using bubble sort
Searching for a specific value in an unsorted array
Which of the following asymptotic notations represents the tightest upper bound on the growth of a function?
Little-o (o)
Big Omega (Ω)
Big-O (O)
Big Theta (Θ)
What is the time complexity of accessing an element in an array using its index?
O(log n)
O(1)
O(n)
O(n log n)
If an algorithm has a time complexity of O(n log n), what can you infer about its runtime as the input size doubles?
It increases by a factor of log n
It remains constant
It increases slightly more than double
It increases exponentially
Why is understanding time complexity crucial in algorithm analysis?
To predict how the performance of an algorithm scales with larger inputs
To compare the aesthetic quality of different algorithms
To calculate the cost of developing an algorithm
To determine the exact execution time of an algorithm
Which data structure, when used for searching, can potentially improve the time complexity from O(n) to O(log n)?
Array
Queue
Binary Tree
Linked List
Which time complexity is represented by an algorithm that iterates through a list of size n and performs a constant time operation in each iteration?
O(n^2)
What does it mean if an algorithm has a time complexity of Ω(n log n)?
It runs in at most n log n time.
It has a logarithmic growth rate.
It runs in at least n log n time.
It runs in exactly n log n time.