Array Triplets | HackerRank

Find the number triplets of disjoint subsets of the array with the same sum.