Company: PhonePe
Difficulty: easy
Maximum Mismatched Positions After Rearranging Problem Description You are given a string `s` of length `n` made up of English letters. You must rearrange the characters of `s` into a new string `t` of the same length. A rearrangement uses every character of `s` exactly once: `t` must be an anagram of `s`. Uppercase and lowercase letters are different characters, so `A` and `a` never match. A position `i` is called *mismatched* when `t[i]` is different from `s[i]`. Choose the rearrangement that makes the number of mismatched positions as large as possible, and report that number. Input Format A single line containing the string `s`. Output Format A single line containing one integer: the largest number of positions at which a rearrangement of `s` can differ from `s`. Constraints `1 <= n <= 100000`, where `n` is the length of `s` `s` contains only the characters `a`-`z` and `A`-`Z` The answer is an integer between `0` and `n`, so 32-bit arithmetic is enough Examples ### Example 1