Seat Reservation | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Seat Reservation

Hello guys , Im building a train ticketing system, i have question regarding assigning seat , what is the suitable command should i use to make the seat reservation? The seat consist of 10 rows , 2 rows infront for business class and 8 other rows for economy class. ======= 0 0 0 0 0 Business class 1 0 1 0 0 ======= 0 0 0 0 0 Economy Class 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ======= 0 = no one 1 = seat occupied

17th Nov 2018, 3:38 AM
Sherwin Chia
Sherwin Chia - avatar
1 Answer
0
That heavily depends on what kind of data type the seating is stored in. Strings, a numpy array, or what?
14th Apr 2024, 3:16 PM
Wilbur Jaywright
Wilbur Jaywright - avatar