Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Problem:
- The word PLANS is on the west shore of a river, while the word PAINTER is on the east shore.
- The farmer needs to take his word PLANS from the west side to the east side.
- However, he can only cross the river with one "chunk" at a time,
- and the words on both shores must be valid words at every intermediate step.
- ----------------------------------------------------------------------------------------
- Solution:
- PLANS PAINTER
- | . |
- | . |
- | ER |
- | . |
- v . v
- PLANERS PAINT
- | . |
- | . |
- | ERS |
- | . |
- v . v
- PLAN PAINTERS
- | . |
- | . |
- | TER |
- | . |
- v . v
- PLANTER PAINS
- | . |
- | . |
- | LANT |
- | . |
- v . v
- PER PLANTAINS
- | . |
- | . |
- | TAIN |
- | . |
- v . v
- PERTAIN PLANS
- Problem:
- The word RETESTED is on the west shore of a river, while the word INGRAIN is on the east shore.
- The farmer needs to take his word RETESTED from the west side to the east side.
- However, he can only cross the river with one "chunk" at a time,
- and the words on both shores must be valid words at every intermediate step.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement