← Questions
Can left and right pieces slide into a target string
0
I was asked this
No reports yet. Sign in to say where you were asked it.
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 official answer yet. Write yours on the right and run it.
Nothing published yet.
Sign in to submit your code; every attempt is kept here.
Write and test your solution herePython in your browser, the question's tests level by level, every submission kept for you.Sign in to start coding
