The Complete Magazine on Open Source

Home Posts Tagged "3-sum problem"

3-sum problem



Welcome to another installment of CodeSport, which focuses on number theoretic algorithms. In particular, we will discuss the well-known 3-SUM problem, where given an array A of N numbers, we need to determine whether there exists a triple a, b and c that belongs to A, such that a+b+c = 0.