Tip 1 : regular practise on data structure
Tip 2 : keep looking to the new things
Tip 1 : share only loyal skills
Tip 2 : keep exploring things
Design a ticket booking system
Tip 1 : step wise solution



You may assume that the sequence is always correct, i.e., every booked room was previously free, and every freed room was previously booked.
In case, 2 rooms have been booked the same number of times, you have to return Lexographically smaller room.
A string 'a' is lexicographically smaller than a string 'b' (of the same length) if in the first position where 'a' and 'b' differ, string 'a' has a letter that appears earlier in the alphabet than the corresponding letter in string 'b'. For example, "abcd" is lexicographically smaller than "acbd" because the first position they differ in is at the second letter, and 'b' comes before 'c'.
n = 6, Arr[] = {"+1A", "+3E", "-1A", "+4F", "+1A", "-3E"}
Now in this example room “1A” was booked 2 times which is the maximum number of times any room was booked. Hence the answer is “1A”.

Here's your problem of the day
Solving this problem will increase your chance to get selected in this company
What is recursion?