A directory of Objective Type Questions covering all the Computer Science subjects. Here you can access and discuss Multiple choice questions and answers for various compitative exams and interviews.

Discussion Forum

Que. What are the time complexities of finding 8th element from beginning and 8th element from end in a singly linked list? Let n be the number of nodes in linked list, you may assume that n > 8.
a. O(1) and O(n)
b. O(1) and O(1)
c. O(n) and O(1)
d. O(n) and O(n)
Answer:O(1) and O(n)
Confused About the Answer? Ask for Details Here
Know Explanation? Add it Here

Similar Questions: