Que. | What is the time complexity to count the number of elements in the linked list? |
---|---|
a. | O(n) |
b. | O(1) |
c. | O(n2) |
d. | O(logn) |
What is the time complexity to count the number of elements in the linked list?
Share
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
The correct answer to the question ‘what is the time complexity to count the number of elements in the linked list‘ is option a. O(n)