Maximum triplet sum in array
Given an array, the task is to find the maximum triplet sum in the array.Examples : Input : arr[] = {1, 2, 3, 0, -1, 8, 10} Output : 21 10 + 8 + 3 = 21 Input : arr[] = {9, 8, 20, 3, 4, -1, 0} Output : 37 20 + 9 + 8 = 37 Recommended PracticeMaximum triplet sum in arrayTry It! Naive approach: In this