Sponsored
Use these hints if you're stuck. Try solving on your own first.
After some sequence of moves, can the order of the pieces change?
Try to match each piece in s with a piece in e.
Solve with full IDE support and test cases