swap-based left shift solution