Skip to content

mehmetseven7/New_World_Puzzle_Code

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

The New World Puzzle Problem:

New World puzzle There are four people who want to cross a rickety bridge; they all begin on the same side. You have 17 minutes to get them all across to the other side. It is night, and they have one flashlight. A maximum of two people can cross the bridge at one time. Any party that crosses, either one or two people, must have the flashlight with them. The flashlight must be walked back and forth; it cannot be thrown, for example. Person 1 takes 1 minute to cross the bridge, person 2 takes 2 minutes, person 3 takes 5 minutes, and person 4 takes 10 minutes. A pair must walk together at the rate of the slower person’s pace. (Note: According to a rumor on the Internet, interviewers at a well-known software company located near Seattle have given this problem to interviewees.)

Solution 1:

Person 1 and person 2 crosses the bridge. Person 1 turns back. person 3 and person 4 crosses the bridge. Person 2 turns back. Person 1 and person 2 crosses the bridge. 17 minutes.

Solution 2:

Person 1 and person 2 crosses the bridge. Person 2 turns back. person 3 and person 4 crosses the bridge. Person 1 turns back. Person 1 and person 2 crosses the bridge. 17 minutes.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages