8000 GitHub - YasenYanev/linked-lists · GitHub
[go: up one dir, main page]

Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Repository files navigation

Linked List

This code is a 'solution' to The Odin Project's Linked Lists Project, a segment within their Computer Science course.

Features

  • append(value) adds a new node with the specified value to the end of the linked list. If the list is empty, the node is added to the start
  • prepend(value) adds a new node with the given value to the beginning of the list
  • size() returns the total number of nodes in the list
  • head() returns the first node in the list
  • tail() returns the last node in the list
  • at(index) returns the node at the specified index, or an error message if the index is invalid
  • pop() removes the last element from the list
  • contains(value) returns true if the specified value is present in the list, otherwise false
  • find(value) returns the index of the node containing the specified value or null if not found
  • toString() returns a representation of the linked list as a string in the format: ( value ) -> ( value ) -> ( value ) -> null

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages

0