Text Equalizer
Easy
string
normalization
text-processing
comparison
Problem Description
Normalize two strings by removing all spaces, punctuation, and converting to lowercase, then check if they are equal. This is useful for comparing text while ignoring formatting differences.
Input Format
Two strings on separate lines.
Output Format
Return "EQUAL" if normalized strings are equal, "NOT EQUAL" otherwise.
Constraints
• 1 ≤ string length ≤ 1000
• Strings can contain letters, digits, spaces, punctuation
• Remove all non-alphanumeric characters
• Convert to lowercase for comparison
• Empty strings after normalization are considered equal
Sample Input/Output
Input:
A man, a plan, a canal: Panama! Amanaplanacanalpanama
Output:
EQUAL
Explanation
First string normalized: "amanaplanacanalpanama". Second string normalized: "amanaplanacanalpanama". They are equal.
Solution Hints
50
Points
Points
1000ms
Time Limit
Time Limit
128MB
Memory Limit
Memory Limit
Code Editor
Register to Access Code Editor
Create a free account to solve coding problems and track your progress.
Register Now