Company: Sirion_lab
Difficulty: medium
Minimum Subsequence Transfer Time Problem Description Given data in the form of an array Arr of size N. You have to transfer a subsequence of size M to the client. The time taken to transfer a subsequence of size M is the product of the first and last element of the subsequence. As you do not want your client to wait, you want to minimize the time taken to transfer the subsequence of size M. What is the minimum time the client has to wait for a subsequence of size M? Function description Complete the function solve(). This function takes the following 3 parameters and returns the required answer: - N: Represents an integer denoting the size of the given array Arr - M: Represents an integer denoting the size of the subsequence - Arr: Represents an integer array of size N representing the given array The function signature is: long long solve (int N, int M, vector Arr) { return 1; } Output format: For each test case in a new line, print an integer representing the minimum time. Examples