Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ Using object oriented design constructs, define a Node class and LinkedList clas
## Exercise
Design and implement the classes and the methods.
Methods to implement in the singly linked list:
- *insert*: method to add a new node with the specific input data value in the linked list.
- *insert*: method to add a new node with the specific input data value in the linked list.
Insert the new node at the beginning of the linked list
- *search*: method to find if the linked list contains a node with specified input value. Returns true if found, false otherwise.
- *find_max*: method to return the max value in the linked list. Returns the data value and not the node.
- *find_min*: method to return the min value in the linked list. Returns the data value and not the node.
- *find_min*: method to return the min value in the linked list. Returns the data value and not the node.
- *length*: method that returns the length of the singly linked list
- *find_nth_from_beginning*: method to return the value of the nth element from the beginning. n is the input to the method.
Assume indexing starts at 0 while counting to n.
Expand All @@ -21,6 +21,6 @@ Methods to implement in the singly linked list:
- *find_middle_value*: Returns the value at the middle element in the singly linked list.
If the node count is even, pick one of the two middle values to return.
- *find_nth_from_end*: find the nth node from the end and return its value. Assume indexing starts at 0 while counting to n.
- *has_cycle*: Checks if the linked list has a cycle. A cycle exists if any node in the linked list links to a node already visited.
- *has_cycle*: Checks if the linked list has a cycle. A cycle exists if any node in the linked list links to a node already visited.
Returns true if a cycle is found, false otherwise.

229 changes: 0 additions & 229 deletions linked_list.rb

This file was deleted.

Loading