Skip to content

Instantly share code, notes, and snippets.

View arieliten's full-sized avatar

Ariel Diaz Bermejo arieliten

  • Rio Cuarto - Argentina
View GitHub Profile
@arieliten
arieliten / clocks_problem.rb
Created July 21, 2010 22:54
The Clocks problem (implemented in Ruby)
##########################################################################
# Problem: The Clocks problem
# Description: suppose you have 2 clocks with the following conditions:
# + one clock put forward one minute each hour; and
# + the other clock put back one minute each hour
# Having both clocks showing the same time, the question is:
# + how long we should wait until they show the same time again?
#
# Solution by Ariel Diaz Bermejo