The Wayback Machine - https://web.archive.org/web/20250803140058/https://www.geeksforgeeks.org/dsa/3sum/
Open In App

3Sum - Complete Tutorial

Last Updated : 23 Jul, 2025
Comments
Improve
Suggest changes
Like Article
Like
Report

The 3-Sum problem is a classic algorithmic problem where the objective is to find all unique triplets in an array that sum up to a specific target value, usually zero. This problem is a popular interview question and is commonly used in coding challenges to test a candidate's understanding of arrays, sorting, and efficient algorithms.

The 3Sum problem can be divided into two categories based on whether the input array is sorted or unsorted.

3Sum on Unsorted Input

3Sum on Sorted Input

Miscellaneous Problems


Article Tags :
Practice Tags :

Similar Reads