Open rushikeshnakhate opened 4 years ago
Given an array of distinct integers. The task is to count all the triplets such that sum of two elements equals the third element.
Input: 2 4 1 5 3 2 3 3 2 7 Output: 2 -1
Given an array of distinct integers. The task is to count all the triplets such that sum of two elements equals the third element.
Input: 2 4 1 5 3 2 3 3 2 7 Output: 2 -1