retraini
  • Home
  • Tracks ▾
    • Complete DSA Mastery
    • All tracks →
  • Search
  • Profile
  • Settings

Two Pointers

A technique that uses two indices to traverse arrays or strings efficiently, reducing time complexity from O(n²) to O(n) in many problems.

  • Opposite Direction Pointers

    Two pointers start from opposite ends and move inward, commonly used for pair sum and container problems.

  • Same Direction Pointers

    Both pointers move forward together, commonly used for in-place array modifications like removing duplicates or shifting elements.

  • Fast & Slow Pointers

    Uses two pointers moving at different speeds to detect cycles or find midpoints in linked lists.

Recently viewed

    Tech Tutorials by Retraini

    Free, in-depth technical tutorials covering data structures, algorithms, and software engineering — taught with clear explanations and worked examples.

    • About
    • Contact
    • Privacy
    • Terms
    • FAQ

    © 2026 Tech Tutorials by Retraini. All content provided as-is for educational use.