What is the time complexity to count the number of elements in the link list?
Answers
Answered by
2
Explanation:
What is the time complexity to count the number of elements in the linked list? Explanation: To count the number of elements, you have to traverse through the entire list, hence complexity is O(n).
Similar questions
English,
28 days ago
Science,
28 days ago
Physics,
1 month ago
Math,
8 months ago
Social Sciences,
8 months ago