Skip to content
Browse files

Added readme

  • Loading branch information...
1 parent cf1a34f commit 6a06eac9d089aa2bdbf5d3a30c01e44c811cdb8f @kenearley committed May 3, 2012
Showing with 10 additions and 11 deletions.
  1. +10 −0 readme.md
  2. +0 −11 saddle_point_finder.rb
View
10 readme.md
@@ -0,0 +1,10 @@
+Given a 5 x 5 matrix of integers, write a program to find any saddle points in the given set.
+A saddle point is a cell whose value is greater than or equal to any in its row and less than or equal to any in its column.
+There may be more than one saddle point. Your program will print the coordinates of any found saddle points.
+If there are none, it should print out "No saddle points found".
+
+Sample input:
+
+arr1 = [[39, 43, 49, 29, 18], [30, 47, 24, 29, 15], [49, 50, 39, 20, 33], [18, 38, 35, 32, 35], [29, 44, 18, 34, 44]]
+arr2 = [[50, 27, 36, 43, 39], [36, 14, 35, 40, 19], [20, 33, 48, 32, 40], [41, 40, 15, 22, 19], [21, 24, 24, 31, 18]]
+arr3 = [[39, 43, 49, 29, 18], [30, 47, 24, 29, 15], [49, 50, 39, 20, 33], [18, 38, 35, 32, 38], [29, 44, 18, 34, 44]]
View
11 saddle_point_finder.rb
@@ -1,14 +1,3 @@
-# Given a 5 x 5 matrix of integers, write a program to find any saddle points in the given set.
-# A saddle point is a cell whose value is greater than or equal to any in its row and less than or equal to any in its column.
-# There may be more than one saddle point. Your program will print the coordinates of any found saddle points.
-# If there are none, it should print out "No saddle points found".
-#
-# Sample input:
-#
-# arr1 = [[39, 43, 49, 29, 18], [30, 47, 24, 29, 15], [49, 50, 39, 20, 33], [18, 38, 35, 32, 35], [29, 44, 18, 34, 44]]
-# arr2 = [[50, 27, 36, 43, 39], [36, 14, 35, 40, 19], [20, 33, 48, 32, 40], [41, 40, 15, 22, 19], [21, 24, 24, 31, 18]]
-# arr3 = [[39, 43, 49, 29, 18], [30, 47, 24, 29, 15], [49, 50, 39, 20, 33], [18, 38, 35, 32, 38], [29, 44, 18, 34, 44]]
-
# The Saddle Point Finder
class SaddlePointFinder

0 comments on commit 6a06eac

Please sign in to comment.
Something went wrong with that request. Please try again.