Company: Swiggy_16oct
Difficulty: medium
Mirror personalities Problem Description N people live in a town. The houses are arranged in a row. The personality of each owner is represented by a lowercase English character. Each person is in a fight with all those people who have a mirror personality to the one in the fight. Lets A be the string "abcd...yz". Let B be the reverse of string A, i.e. "zyx...ba". The mirror of any character from string A is the character in the same index in string B. Reverse of 'a' is 'z', reverse of 'z' is 'a'. Given the personality of each person in the town, determine the number of pairs of residents who are in a fight. Note: (i, j) is the same as (j, i). Function description Complete the function solution() . The function takes the following 2 parameters and returns the solution: N : Represents the length of the string S : Represents the input string Input format for custom testing Note: Use this input format if you are testing against custom input or writing code in a language where we don't pro