Consider a singly linked list. What is the time complexity of inserting an element at the beginning of the list?
O(log n)
O(n)
O(1)
O(n^2)

Mechanical Engineering Exercises are loading ...