Why is copying values and sorting less ideal?
Practice this question from Merge Two Sorted Lists - Dummy node Pattern Practice Quiz, with options and an explanation.
Question
Why is copying values and sorting less ideal?
Option A — Correct answer
It ignores sorted inputs and uses extra space
Option B
It is always O(1)
Option C
It cannot include duplicates
Option D
It requires a cycle
Explanation
It ignores that the lists are already sorted and uses extra space.