Can left and right pieces slide into a target string
A string holds pieces that can only move left, pieces that can only move right, blanks, and walls that nothing passes. Given a start and a target string, decide whether the start can be turned into the target by sliding pieces through blanks in their allowed direction. Compare the pieces in order with two pointers and check each one's position against its direction and the walls.
No answer yet. Write the first one; the best answer gets endorsed.
