DEV Community

loading...

Discussion on: How to Solve Any Algorithm

Collapse
sbleks profile image
Bleks
  1. Farmer brings duck to side b
  2. Farmer goes back to side a
  3. Farmer brings fox over to side b
  4. Farmer brings duck back to side a
  5. Farmer brings corn to side b
  6. Farmer goes back to side a
  7. Farmer brings duck to side b

This way the Fox is never left alone with the duck and the duck is never left alone with the corn while getting all three to side b. No need for a cage!

Collapse
sharpninja profile image
The Sharp Ninja

Cool! But the cage is more efficient. ;)

Thread Thread
pengriffey profile image
pengriffey

The cage is less efficient

Thread Thread
sharpninja profile image
The Sharp Ninja

The cage requires less trips, plus you can stack stuff on it. Put the fox in another cage and lash them together for more efficiency.