Skip to content

Conversation

@Brijesh03032001
Copy link
Contributor

@Brijesh03032001 Brijesh03032001 commented Oct 25, 2025

  • Implement fast & slow pointer template with cycle detection, middle node, nth-from-end
  • Add comprehensive examples and educational comments
  • Update DIRECTORY.md with new algorithm entry in alphabetical order

Hacktober fest

@siriak @Panquesito7 @acylam Please see to it, this is really helpful for those who want to learn intermediate level of linked list.

- Implement fast & slow pointer template with cycle detection, middle node, nth-from-end
- Add comprehensive examples and educational comments
- Update DIRECTORY.md with new algorithm entry in alphabetical order
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces a two-pointer technique implementation for linked lists, providing a reusable template for common linked list operations using fast and slow pointer patterns (Tortoise and Hare algorithm).

Key Changes:

  • Adds two_pointer_technique.r implementing cycle detection, middle node finding, and nth-from-end node retrieval
  • Updates DIRECTORY.md to include the new algorithm in the linked list algorithms section

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
linked_list_algorithms/two_pointer_technique.r New implementation of two-pointer technique with cycle detection, middle node finding, and nth-from-end node retrieval
DIRECTORY.md Added entry for the new two-pointer technique algorithm

Copy link
Member

@siriak siriak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks!

@siriak siriak merged commit d04ded1 into TheAlgorithms:master Oct 26, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants