π Week 5 Java Mini Projects β Linked List Applications Welcome to the Week 5 Java Mini Projects Repository! This week focused on applying core Linked List concepts through problem-solving and algorithm implementation. Below are the three mini-projects built with detailed descriptions.
πΉ 1. Palindrome Linked List Checker π Description This program checks whether a given singly linked list is a palindrome or not. It uses the fast and slow pointer approach to find the middle of the list and then reverses the second half to compare both halves.
π§ Concepts Used Fast and slow pointer technique
Linked list reversal
Comparison of node values
β Sample Output Is Palindrome: true
πΉ 2. Find N-th Node From the End π Description A common interview question where the goal is to find the N-th node from the end of a singly linked list using a two-pointer approach.
π§ Concepts Used Two-pointer technique
Edge case handling
Efficient single-pass traversal
β Sample Output 2nd node from end: 40
πΉ 3. Floyd's Cycle Detection (Hare-Tortoise Algorithm) π Description This project implements Floyd's Cycle Detection Algorithm, also known as the Hare and Tortoise method, to detect a cycle (loop) in a linked list.
π§ Concepts Used Cycle detection using fast and slow pointers
Detecting repeated nodes in O(n) time and O(1) space
β Sample Output Cycle detected: true
π Project Structure Copy Edit Week5_Java_Projects/ βββ PalindromeLinkedList.java βββ FindNthFromEnd.java βββ DetectCycle.java βββ README.md π Key Learning Outcomes Strong understanding of pointer manipulation in Linked Lists
Applied time and space-efficient techniques
Practiced and implemented real-world DSA interview problems