Merge sort

Input data:

in — the subarray the call received out — not computed yet out — being merged out — sorted call not reached yet

Pseudocode

      
Recursion stack (top first)