Company: Myntra
Difficulty: medium
Push Pop You have a list of numbers, and your goal is to rearrange them into a palindrome. A palindrome is a sequence that reads the same forwards and backward, like \"12321\". Here\'s the only move you can make: Split an element: Choose any number in the list and divide it into two smaller positive numbers. For example, you can turn a 5 into a 2 and a 3. Your challenge: Use the fewest splits possible to create a palindrome. It\'s always possible to turn any list into a palindrome using this rule! Input Format The first line of input contains one integer N, representing size of list. The second line contains N space separated integers A 1 ,A 2 ,...,A n . Output Format Print the minimum number of operations to turn a into a palindrome sequence. Constraints 1 ≤ N ≤ 5×10 5 0 ≤ A i ≤ 10 9 Sample Test Cases Sample Testcase 1 Input: 2 1 1 Output: 0 Explanation: We don\'t need to do anything as it is already a palindrome. Sample Testcase 2 Input: 3 3 2 1 Output: 1 Explanation: We use the foll