Concept Flow - Merge Two Sorted Arrays Without Extra Space
Start with two sorted arrays A and B
Compare last element of A with first element of B
If A's last > B's first?
Yes→Swap elements
Sort array B
Sort array A
Repeat until no swaps
Merged arrays
We repeatedly compare and swap elements between the two arrays to ensure all smaller elements are in the first array and larger in the second, sorting each after swaps until fully merged without extra space.