Sorts integers digit by digit from the least significant to the most significant 2-bit group, applying a stable counting sort at each pass so that the order established by previous passes is never disturbed.
Base 4 (2-bit groups) keeps the per-pass counting table to just four slots, minimising the memory footprint per pass at the cost of requiring more passes than larger bases.