Java

Find three-element sum closest to Zero in Java

Given an array of integers, find the sum of any three elements which is closest to zero. The array may contain positive and negative elements.

Java Code:




Output:

 

Leave a Comment