Check if any subarray can be made palindromic by replacing less than half of its elements
Given an array arr[] of size N, the task is to check if any subarray from the given array can be made a palindrome by replacing less than half of its elements (i.e. floor[length/2]) by any other element of the subarray. Examples: Input: arr[] = {2, 7, 4, 6, 7, 8}Output: YesExplanation: Among all sub