Following the TOP (The Odin Project) course and developing a linked list project to practice my DSA.
- Clone the repository:
git clone https://github.com/otherdcn/top-linked-lists.git
- Install dependencies:
bundle install
Build with either the singly linked list (LinkedList::Singly)
or the doubly linked list (LinkedList::Doubly)
Use the following command to run the application:
ruby main.rb
Examples of features/abilities of Linked Lists:
- Appending to a list with
#append
- Prepending to a list with
#prepend
- Finding nodes using
#at
, and popping/removing nodes using#pop
- Shifting/ removing from top using
#shift
- Checking if list contains a node
#contains
and finding a node's index in list using#find
- Inserting and removing nodes from random indices using
#insert_at
and#remove_at
- Reverse the list using
#reverse!
(for in-place modification) and/or#reverse
(for returning a new list). - Examine a node's data and its pointers using
#examine_node
If you feel the need to try it out and perhaps contribute:
- Fork the repository.
- Create a new branch:
git checkout -b feature-name
. - Make your changes.
- Push your branch:
git push origin feature-name
. - Create a pull request.
This project is licensed under the MIT License.