Coders Crushby Napplied AI
Back to DSA Problems
MediumTwo Pointers

3Sum

Find all unique triplets summing to 0

Solution Approach

Sort and two-pointer for each element

Complexity Analysis

Time Complexity

O(n²)

Space Complexity

O(1)
Complexity
Time:O(n²)
Space:O(1)
Asked at
GoogleFacebookAmazon
Coders Crushby Napplied AI

The ultimate interview preparation platform. Master System Design, DSA, and tackle community challenges to crush your FAANG interviews.

Looking for jobs? Visit Napplied AI Jobs Search Agent

System Design

  • All Problems
  • Easy
  • Hard

DSA

  • All Problems
  • Dynamic Programming
  • Graphs

More

  • Problems Arena
  • Growth Paths
  • My Crush

Coders Crush by Napplied AI - Tech Interview & Coding Should Be Effortless