give integer array num return number triplet choose array triangle length triangle Example 1input num 2234output 3explanation Valid combination 234 2234 second 2223example 2input num 4234output 4 constraints1 numslength 10000 numsi 1000