Dsa
Hashing
Easy
String Anagram Checker
Given two strings, determine if one string is an anagram of the other. An anagram is a rearrangement of characters. Ignore case and spaces.
Input:
- Two lines, each containing one string (1 ≤ |s| ≤ 1000).
Output:
- 'YES' if the strings are anagrams of each other, 'NO' otherwise.
Example:
Input:
Listen
Silent
Output:
YES
Key concepts
hashingstring comparisoncounts
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