Decode Flood Alert Message
Decode Flood Alert Message
EasyStrings100% accepted
During monsoon season in Mumbai, the BMC sends flood alerts. Arjun, a disaster management officer, needs to decode alert messages where each character represents a danger level. He must find if a specific alert pattern appears in the received message.
Approach
Given a flood alert string S and a pattern P, check if pattern P exists as a substring in S.
Input
S="HIGH0010MEDIUM", P="0010"
Output
true
More Strings problems
Browse all coding problems →solution.py
Loading editor...
Test 1
Test 2
Test 3
Press Run to test your custom input, or Submit to judge against all test cases.
Sign in to continue
Create a free account to run code, submit solutions and track progress.
- Free forever — no credit card
- 10+ languages with live execution
- Points, streaks & leaderboards