Advertisement
Guest User

Untitled

a guest
Jul 16th, 2019
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.45 KB | None | 0 0
  1. Problem:
  2.  
  3. The word PLANS is on the west shore of a river, while the word PAINTER is on the east shore.
  4. The farmer needs to take his word PLANS from the west side to the east side.
  5. However, he can only cross the river with one "chunk" at a time,
  6. and the words on both shores must be valid words at every intermediate step.
  7.  
  8.  
  9. ----------------------------------------------------------------------------------------
  10.  
  11.  
  12. Solution:
  13.  
  14.  
  15.  
  16.  
  17. PLANS PAINTER
  18. | . |
  19. | . |
  20. | ER |
  21. | . |
  22. v . v
  23. PLANERS PAINT
  24. | . |
  25. | . |
  26. | ERS |
  27. | . |
  28. v . v
  29. PLAN PAINTERS
  30. | . |
  31. | . |
  32. | TER |
  33. | . |
  34. v . v
  35. PLANTER PAINS
  36. | . |
  37. | . |
  38. | LANT |
  39. | . |
  40. v . v
  41. PER PLANTAINS
  42. | . |
  43. | . |
  44. | TAIN |
  45. | . |
  46. v . v
  47. PERTAIN PLANS
  48.  
  49. Problem:
  50.  
  51. The word RETESTED is on the west shore of a river, while the word INGRAIN is on the east shore.
  52. The farmer needs to take his word RETESTED from the west side to the east side.
  53. However, he can only cross the river with one "chunk" at a time,
  54. and the words on both shores must be valid words at every intermediate step.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement