Company: Mathworks_12july
Difficulty: medium
Palindromic Strings Problem Description A string is a palindrome if reading it from right to left gives exactly the same string as reading it from left to right. An analyst is given an array arr of n strings. Every string consists of lowercase English letters only. In one operation the analyst chooses four integers x , y , i , j such that 1 <= x, y <= n , 1 <= i <= length(arr[x]) and 1 <= j <= length(arr[y]) , and then swaps the characters arr[x][i] and arr[y][j] , using 1-based indexing. (inferred - the source does not say whether x and y must be different. They need not be: an operation may exchange two positions inside one and the same string.) An operation only moves characters between positions, so the length of every string stays the same and the collection of letters present across the whole array never changes. The analyst wishes to determine the maximum number of strings of arr that are palindromes at the same time , after performing the operation any number