This is a simple implementation of the Caesar Cipher in Ruby. The program takes a string and a shift factor as input and returns the encrypted string.
- Clone this repository to your local machine.
- Navigate to the project directory.
- Run the program by executing the following command:
ruby caesar_cipher.rb
- Follow the on-screen instructions to encrypt a string.
This is a simple implementation of a method that takes a word as the first argument and then an array of valid substrings (the dictionary) as the second argument. It returns a hash listing each substring that was found in the original string and how many times it was found.
- Clone this repository to your local machine.
- Navigate to the project directory.
- Run the program by executing the following command:
ruby sub_strings.rb
- Follow the on-screen instructions to find the substrings in a word.
This is a simple implementation of the Bubble Sort algorithm in Ruby.
This is a simple implementation of a method that takes an array of stock prices, one for each hypothetical day. It returns a pair of days representing the best day to buy and the best day to sell.