Find Triplets With Sum Zero

easy
1. You will be given an Array. 2. You will also be given length of the array 3. You need to find if there is a triplet in the array such that their sum is 0. 4. Return true, if such a triplet is found, else return false. 5. Input and output is handled for you 6. It is a functional problem ,please do not modify main()

Input Format

Input is handled for you.

Output Format

Output is handled for you.

Constraints

1 <= N <= 106
 -106 <= A <= 106

Notice

Try First, Check Solution later

1. You should first read the question and watch the question video.
2. Think of a solution approach, then try and submit the question on editor tab.
3. We strongly advise you to watch the solution video for prescribed approach.

Example

Input
9
14 -5 -1 15 6 0 10 4 -8
Output
true
Previous
Find The Odd Occurrence
Next
Find Unique Element

Related Questions