Problem 777 · Medium
Two pointers match the L and R letters in order while checking they only move in their legal direction.
Open the interactive visualisation