Question bank › Strings
Dsa Strings Hard

Case Insensitive Anagram Check

Given two strings, determine if they are anagrams of each other, ignoring spaces and case differences. An anagram is a word formed by rearranging the letters of a different word. Your task is to return 'Yes' if they are anagrams and 'No' otherwise. Input Format: Two lines, the first containing the first string and the second containing the second string. Output Format: 'Yes' if the strings are anagrams; 'No' otherwise. Example: Input: A gentleman Elegant man Output: Yes Explanation: When ignoring spaces and case, both strings contain the same letters.

Key concepts

stringsanagramscase-insensitivity

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.