Find the right array pattern
Merge two sorted arrays. Then adapt your solution when one array has enough unused space to hold both. Explain how you avoid overwriting unread values.
What a strong answer demonstrates
A maintained invariant, correct boundary handling, and justified complexity.