package Others; import java.util.Scanner; import java.util.Arrays; /** * To find triplet equals to given sum in complexity O(n*log(n)) * * * Array must be sorted * * @author Ujjawal Joshi * @date 2020.05.18 */ class threesum{ public static void main(String args[]) { Scanner sc =new Scanner(System.in); int n=sc.nextInt(); //Length of an array int a[]=new int[n]; for(int i=0;i