Skip to content

mitch3lljones/ruby-data-structures

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Data Structures in Ruby

Table of Contents

Binary Search Tree

Information

In this program, a simple binary search tree was made (does not handle duplicates). This was implemented using both recursive and iterative methods. All the files you will need to run this are in this repository with the instructions in the instructions section. This program is built using Ruby v2.6.3p62.

Status

At this time, the project is finished.

Knight's Travails

Information

In this program, the shortest path for a knight to travel on a chess board is calculated This was implemented using both recursive and iterative methods. All the files you will need to run this are in this repository with the instructions in the instructions section. This program is built using Ruby v2.6.3p62.

Status

At this time, the project is finished.

Instructions

To run these programs, Ruby v2.6.3p62 (or a compatible version) will need to be installed. To check the version of ruby you are using, run this command in terminal:

ruby -v

If ruby is not installed, follow these instructions to install it. After ruby is installed, you should clone this repository to a place easily accessible to you using this command in terminal:

git clone https://github.com/fussykyloren/ruby-data-structures.git

Your github username and password should be requested. If not, don't worry about it. After the repository is cloned, you will need to change the directory to where the game example is saved. To to use the fibonacci programs, run this command next:

cd [LOCATION_OF_CLONED_REPOSITORY]/binary-search-tree

To use the merge sort programs, run this command instead:

cd [LOCATION_OF_CLONED_REPOSITORY]/knights-travail

Once the repository is cloned and you are in the correct directory, you can run the programs. To do this, run this command:

ruby test.rb

The test.rb file can be modified to run for other purposes as needed.