Hotel Room Booking Code Validator
Hotel Room Booking Code Validator
MediumStrings0% accepted
Arjun manages a Mumbai luxury hotel chain using encoded room booking references. Each booking code contains room type, floor, and capacity that must be validated before check-in.
Approach
Given a booking reference string in format 'CITY-TYPE-FLOOR-CAPACITY-YEAR', extract and validate room details.
Input
MH-LX-05-4-2024
Output
LUXURY-5-4
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