Question DSA-LL-0067
HardTwo sorted linked lists of lengths m and n are merged. How many pointer comparisons are needed in the worst case?
- A.
m + n − 1
- B.
max(m, 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
Two sorted linked lists of lengths m and n are merged. How many pointer comparisons are needed in the worst case?
m + n − 1
max(m, n)
Sign up free to see the answer and a step-by-step explanation.
m × n
log(m + n)