Check Bus Seat Available
This problem comes from a simple travel situation. You know how many seats a bus has in total, and you know how many of those seats are already taken.
Your task is to decide whether there is still at least one seat available. If there is, print AVAILABLE. If every seat is already taken, print FULL.
For example, if the bus has 40 seats and 36 are already taken, the answer is AVAILABLE. But if the bus has 40 seats and all 40 are taken, the answer is FULL.
So the task is to compare the taken seats with the total seats and return the correct message.
Example Input & Output
There are still seats left, so the bus is not full yet.
Every seat is already taken.
If nobody has taken a seat yet, seats are still available.
Algorithm Flow

Solution Approach
A simple way to solve this is to compare two numbers.
First, read the total seat count and the number of taken seats. After that, check whether the taken seat count is smaller than the total seat count.
The condition is:
If that condition is true, there is still room left, so you print AVAILABLE.
If that condition is false, the bus has no free seat left, so you print FULL.
This problem is really just one quick availability check.
Best Answers
Solutions Coming Soon
Verified best solutions for this Challenge are still being analyzed and will be available soon.
Comments (0)
Join the Discussion
Share your thoughts, ask questions, or help others with this Challenge.
