Skip to content

otherdcn/top-linked-lists

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Project: Linked Lists

Following the TOP (The Odin Project) course and developing a linked list project to practice my DSA.

Table of Contents

Installation

  1. Clone the repository:
git clone https://github.com/otherdcn/top-linked-lists.git
  1. Install dependencies:
bundle install

Usage

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:

  1. Appending to a list with #append Image 1
  2. Prepending to a list with #prepend Image 2
  3. Finding nodes using #at, and popping/removing nodes using #pop Image 3
  4. Shifting/ removing from top using #shift Image 4
  5. Checking if list contains a node #contains and finding a node's index in list using #find Image 5
  6. Inserting and removing nodes from random indices using #insert_at and #remove_at Image 6
  7. Reverse the list using #reverse! (for in-place modification) and/or #reverse (for returning a new list). Image 7
  8. Examine a node's data and its pointers using #examine_node
  • singly linked lists Image 8
  • doubly linked lists Image 8(2)

Contributing

If you feel the need to try it out and perhaps contribute:

  1. Fork the repository.
  2. Create a new branch: git checkout -b feature-name.
  3. Make your changes.
  4. Push your branch: git push origin feature-name.
  5. Create a pull request.

License

This project is licensed under the MIT License.

About

Simply an attempt at linked lists... In Ruby

Resources

License

Stars

Watchers

Forks

Languages