0015. 3Sum
Find all unique triplets that sum to zero
Array:
Apply
Sort + Two Pointers
O(n^2)
Brute Force
O(n^3)
▶ Play
▮▮ Pause
▶| Step
↺ Reset
Speed:
Step:
0
Original Array
↓ sort()
Sorted Array (with pointers)
Click
Play
or
Step
to begin the animation.
Found Triplets
▶ Play
▮▮ Pause
▶| Step
↺ Reset
Speed:
Step:
0
Sorted Array (i, j, k pointers)
Click
Play
or
Step
to begin the animation.
Found Triplets