This is a small puzzle that I saw a lot as a kid but surprisingly haven't found on this site. Enjoy!
You have six frogs arranged on seven lily pads in a line: three male frogs facing right on the leftmost lily pads and three female frogs facing left on the rightmost lily pads.
M M M _ F F F
How can you switch the positions of the frogs (have the male frogs end up where the female frogs currently sit and vice versa)?
- Each lily pad can hold only one frog.
- Frogs can only move in the direction they are facing.
- Frogs can move forward to an empty lily pad or jump over one frog to the empty lily pad on the other side.