Skip to content

Jrakesh/ruby_puzzles

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

RubyPuzzles

  • This repository contains three ruby puzzles.
  • Problem statements are in the README.md file within corresponding problem folder.
  • Try them once without taking help from the provided solutions.
Have fun !!

Usage/Instructions

  • I have used Fedora17 OS for solving these problems.
Note:-
  • Problem-2 is related with parsing of a CSV file. While running test, it generates one error in country _ip_test.rb file.
 Errno::ENONT: No such file or directory - md5 -q IpToCountry.csv
  • The following command mentioned in country_ip_test.rb file in problem_2 is not working as 'md5' command is not available for linux.
`md5 -q IpToCountry.csv`.strip 
  • Please replace line-27 in country_ip_test.rb file of problem_2 with the following two lines to remove the error mentioned above.
 require 'digest/md5'
 assert_equal '22620fdd50ebaef84dd3d9521beb6a7c', Digest::MD5.hexdigest(File.read(Dir.pwd+"/IpToCountry.csv"))

About

Ruby puzzles for fun !!

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages