Capgemini
Company
Programming
Arrays
What is the time complexity of searching for an element in a circular linked list?
A)O(n) B)O(nlogn) C)O(1) D)None of these
Read Solution (Total 3)
-
- Answer is Option A. O(n)
It is in Worst case,,,,,
Since we have to traverse through the entire list of N elements. - 4 years agoHelpfull: Yes(7) No(1)
- O(n) because oce all the elements need to be traced for the searching in the best case.
- 4 years agoHelpfull: Yes(1) No(1)
- O(n) because in the worst case we need to trace all the elements for searching a particular element.
- 4 years agoHelpfull: Yes(1) No(1)
Capgemini Other Question