Shanghai (Mah Jong Solitaire)

Find matching pairs to eliminate them, but only if free to move left or right. Also called Mah Jong Solitaire.
A bit of Chinese culture, internet style.