Which of the following typically represents the most inefficient time complexity for large input sizes?
O(n!)
O(n log n)
O(n^2)
O(2^n)
What is the primary focus of Big-O notation in time complexity analysis?
Calculating the average-case runtime of an algorithm
Expressing the exact number of operations an algorithm performs
Describing the upper bound of an algorithm's growth rate
Representing the lower bound of an algorithm's growth rate
Merge sort and heapsort are examples of sorting algorithms with which time complexity?
O(n)
What is the time complexity of the QuickSort algorithm in the worst-case scenario?
O(log n)
What is the worst-case time complexity of deleting an element from an unsorted array?
O(1)
Which notation provides both an upper and lower bound on the growth of a function, implying the function grows at the same rate as the specified function?
Big Omega (Ω)
Big-O (O)
Big Theta (Θ)
Little-omega (ω)
Which sorting algorithm has a time complexity of O(n^2) in its average and worst case?
Quick Sort
Merge Sort
Heap Sort
Bubble Sort
Which of the following statements is TRUE regarding the trade-off between code optimization and readability?
Code readability is irrelevant as long as the code achieves optimal performance.
Excessive optimization can sometimes hinder code readability, making maintenance difficult.
Highly optimized code is always easier to read and maintain.
There's no trade-off; optimal performance and readability always go hand-in-hand.
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?
What is the worst-case time complexity of the linear search algorithm?