Question DSA-LL-0007
EasyWhat is the time complexity of searching for a value in an unsorted linked list?
- A.
O(n)
- B.
O(n log n)
- C.
Show answer and explanation
Answer: A
You may have to visit every node.
Popular companies
Prepare company by company
Hiring pattern, syllabus, past questions and mocks for each company.
All companiesPractice by subject
Linked Lists question
What is the time complexity of searching for a value in an unsorted linked list?
O(n)
O(n log n)
Answer: A
You may have to visit every node.
O(1)
O(log n)