Implement in-memory data structures and booking API | Oracle Interview Question