Question: What is the time complexity of inserting an element at a specific index in an array?
Options:
Correct Answer: O(n)
Solution:
Inserting an element at a specific index in an array requires shifting elements, which takes O(n) time in the worst case.