Loading Company...
This is a verified interview question from Ion. Candidates reporting seeing this problem in recent Online Assessments (OAs) and onsite rounds. Mastering "Complementary Pairs of Strings" covers key patterns like Strings.
"Two strings form a complementary pair if there exists some permutation of their concatenation that forms a palindrome. For example, the strings 'abc' and 'cab' form a complementary pair since their concatenation 'abccab' can be rearranged to form the palindrome 'abcba'. 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."
Join thousands of developers practicing for Ion.