Question bank › Strings
Dsa Strings Medium

Frequency Pattern Check

Given a string `s`, write a program to check if the string can be rearranged to form another string that follows a frequency pattern. A string follows a frequency pattern if the frequency of each character is unique (i.e., no two characters have the same frequency). Return True if it's possible, otherwise return False. ### Input Format: - A single line containing the string `s` (1 <= |s| <= 1000). ### Output Format: - A single boolean value ('True' or 'False'). ### Example: Input: aabbcc Output: False Explanation: The frequency of 'a', 'b', and 'c' are each 2, which means they do not have unique frequencies.

Key concepts

stringsfrequencyhashing

Practise this out loud — free

Start a mock interview on THIS exact question — a voice AI interviewer opens with it, pushes back like a real onsite, then hands you an instant scorecard.

🎙 Practise this question now
Part of Praxari's verified interview question bank. We show the prompt and concepts to practise with — never a copy-paste solution.