Find triplet (i, j, k) to maximize (P * arr[i] + Q * arr[j] + R * arr[k])
Given an array arr[] of size N and three numbers P, Q, and R. The task is to find three indices named (i, j, k) in the given array such that i < j < k, and the value of equation (P * arr[i] + Q * arr[j] + R * arr[k]) should be maximum. Examples: Input: arr[] = {1, 2, 3, 4, 5}, P = 1, Q = 2, R