The 3SUM problem is a classic algorithmic problem in computer science, particularly in the fields of computer algorithms and complexity theory. The problem can be stated as follows: Given an array of integers, the task is to determine if there exist three distinct indices \( i, j, k \) such that the sum of the elements at these indices is equal to zero, i.e.