Skip to content

milkandvodka/java-singly-linked-list

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

Singly Linked List Implementation in Java

A complete implementation of a generic singly linked list data structure with advanced operations.

Features

  • Core Operations:

    • Add/remove at head, tail, or any position
    • Get elements by position (from start or end)
    • Convert to array
    • List cloning
  • Advanced Operations:

    • Loop detection (Floyd's Cycle-Finding Algorithm)
    • Loop removal
    • List reversal (recursive)
    • Merge two linked lists
    • Find middle node (fast/slow pointer technique)
  • Utility Methods:

    • size(), isEmpty(), contains()
    • indexOf(), lastIndexOf()
    • print_list()-> (you can also implement object.toString() with the help of StringBuilder and print object instead)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages