Fast and Slow Pointer Question List

Linked List Problems

  1. Linked List Cycle
    Problem: Determine if a linked list has a cycle.
    Difficulty: Easy

  2. Linked List Cycle II
    Problem: Find the node where the cycle begins in a linked list.
    Difficulty: Medium

  3. Happy Number
    Problem: Determine if a number is a "happy number," which involves detecting cycles in the sum of the squares of its digits.
    Difficulty: Easy

  4. Middle of the Linked List
    Problem: Find the middle node of a linked list.
    Difficulty: Easy

  5. Palindrome Linked List
    Problem: Determine if a linked list is a palindrome.
    Difficulty: Easy

  6. Intersection of Two Linked Lists
    Problem: Find the intersection node of two singly linked lists.
    Difficulty: Easy
    Array Problems

  7. Find the Duplicate Number
    Problem: Find the duplicate number in an array where the numbers are used to form a cycle.
    Difficulty: Medium

  8. Circular Array Loop
    Problem: Determine if there is a loop in an array where each index points to the next index to visit.
    Difficulty: Medium

  9. Circular Array Loop
    Problem: Similar to problem 142, but on arrays instead of linked lists.
    Difficulty: Medium

  10. Remove Duplicates from Sorted Array
    Problem: Use two pointers to remove duplicates from a sorted array in place.
    Difficulty: Easy

  11. Sort Colors
    Problem: Sort an array of colors using a two-pointer technique.
    Difficulty: Medium

  12. Remove Nth Node From End of List
    Problem: Remove the nth node from the end of a linked list using two pointers.
    Difficulty: Medium

  13. Longest Substring Without Repeating Characters
    Problem: Find the length of the longest substring without repeating characters.
    Difficulty: Medium
    Two Pointers (Related Technique)

  14. Two Sum II - Input Array Is Sorted
    Problem: Find two numbers in a sorted array that add up to a specific target using a two-pointer technique.
    Difficulty: Medium

  15. 3Sum
    Problem: Find all unique triplets in an array that sum up to zero using a two-pointer technique.
    Difficulty: Medium

  16. 3Sum Closest
    Problem: Find a triplet that is closest to a given target using a two-pointer technique.
    Difficulty: Medium

  17. Merge Sorted Array
    Problem: Merge two sorted arrays into one using two pointers.
    Difficulty: Easy

  18. Longest Word in Dictionary through Deleting
    Problem: Find the longest word in a dictionary that can be formed by deleting some characters of a given string using two pointers.
    Difficulty: Medium

Comments (2)