Question DSA-LL-0054
MediumWhat is the time complexity of finding the k-th node from the end with two pointers?
- A.
O(k)
- B.
O(n²)
- C.
Sign up free to see the answer and a step-by-step explanation.
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 finding the k-th node from the end with two pointers?
O(k)
O(n²)
Sign up free to see the answer and a step-by-step explanation.
O(n) in one pass
O(log n)