These are solutions to the questions to Cracking the Coding Interview 6th edition in Ruby.
All solutions live in the /lib
directory.
If you are only interested in seeing the solutions in Ruby, ignore the steps below. They pertain to tests written in Rspec to make sure the solution covers various cases and behaves as intended.
To run the tests:
- Download/clone repository.
- Navigate to the root directory of the repo via terminal/command line interface.
- Run the command
bundle install
to install all dependencies. - Due to the nature of this project dir setup, the
rspec
command to run all tests won't work as intended. - Run the command
rspec spec/ch01/1.01_spec.rb
to run tests for specific problems only.