Skip to content

kristinh12/linked-list

Repository files navigation

Linked List

This includes a class for a Stack, a Queue, and a LinkedListNode.

I created two methods that can both reverse the values in a linked list. The first one, reverse_list, does so by iterating through the original list and adding its values to the front of a new list. The new list will end up being the reverse of the original. The second method, reverse, involves using a stack instead.

Tests for Stack: stack_spec.rb Tests for Queue: queue_spec.rb Tests for reversing a linked-list: linked-list-node_spec.rb

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages