Count of valid pairs (X, Y) from given strings such that concatenating X with itself yields Y
Given an array arr[] of N strings. Let X and Y be two strings, X and Y are said to be valid pairs if the rearrangement of the resultant string from the concatenation of X with X (i.e., X+X) gives Y. The task is to count the number of such valid pairs. Examples: Input: N = 4, arr[] = {âhackerâ, âacke