Company: Microsoft_18july
Difficulty: medium
Complementary Pairs Problem Description Two strings form a complementary pair if there exists some permutation of their concatenation that forms a palindrome. For example, the strings "abac" and "cab" form a complementary pair since their concatenation "abaccab" can be rearranged to form the palindrome "bcaacab". Given an array of strings, find the number of complementary pairs that can be formed. Note that pairs (i, j) and (j, i) are considered the same. Your task is to complete the function `countComplementaryPairs` which takes a vector of strings, `stringData`, as input and returns a `long` integer representing the number of complementary pairs. Examples Example 1: Input: stringData = ["abc", "abcd", "bc", "adc"] Output: 3 Explanation: The complementary pairs are: ("abc", "abcd"): Concatenation "abcabcd". Character counts: a:2, b:2, c:2, d:1. Only 'd' has an odd count, so it can form a palindrome. ("bc", "abc"): Concatenation "bcabc". Character counts: a:1, b:2, c:2. Only 'a' has an