These are some interview questions on Algorithms. More questions will be added every week or so.
Please enable JavaScript to view this page content properly.

Algorithms Interview Question: Given two numbers m and n, write a method to return the first number r that is divisible by both....

There are four people
who want to cross a bridge; theyall
begin on the same side. You have 17 minutes to get them all across tothe other side. It is night, and they
have one flashlight. A maximum of twopeople
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 bewalked back and forth; it cannot be
thrown, for example.Person 1 takes1
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 therate
of the slower personâ€™s pace. For example, if person 1 and person 4walk across first, 10 minutes have
elapsed when they get to the other sideof
the bridge. If person 4 returns the flashlight, a total of 20 minutes
have passed and you have failed
the mission.