To merge two sorted arrays a[] and b[] without extra space, rearrange elements such that the smallest n elements are in a[] and the rest are in b[], keeping both arrays sorted. This can be done using methods like insertion-sort logic, gap method, or swapping and sorting. Each approach ensures elements are sorted within their respective arrays after merging. The goal is efficient merging with minimal space usage.
For more details, visit the GeeksforGeeks article: Merge Two Sorted Arrays Without Extra Space.