Design a parking lot which can hold n cars of different color and different registration numbers.

Every car has been issued a ticket for a spot and the spot has been assigned based on the nearest to the entry point.

The system should also return some queries such as:

  • Registration numbers of all cars of a particular Color.
  • Ticket number in which a car with a given registration number is placed.
  • Ticket numbers of all ticket where a car of a particular color is placed.