Most Booked Hotel Room

Asked at Google · Coding & Leetcode-style Questions · Difficulty: Medium

Given a hotel which has 10 floors [0-9] and each floor has 26 rooms [A-Z]. You are given a sequence of rooms, where `+` suggests room is booked, `-` room is freed. You have to find which room is booked maximum number of times.

Loading the problem…