Air tickets reservation program

The following pseudo-code is used to find the next available seat in airplanes.

f o r r o w = A t o F d o f o r c o l u m n = 1 t o 13 d o i f a s e a t ( r o w , c o l u m n ) i s a v a i l a b l e t h e n b o o k t h e s e a t a n d m a r k i t o c c u p i e d n e x t c o l u m n n e x t r o w for \ row \ = \ A \ to \ F \ \ do \\ \ \ \ for \ column \ = \ 1 \ to \ 13 \ \ do \\ \ \ \ \ \ \ if \ a \ seat \ (row, \ column) \ is \ available \\ \ \ \ \ \ \ \ \ \ then \ book \ the \ seat \ and \ mark \ it \ occupied \\ \ \ \ next \ \ column \\ next \ \ row

The given AIRPLANE SEATING DIAGRAM \text{AIRPLANE SEATING DIAGRAM } shows the occupied and available seats.

After booking 51 51 seats what will be the actual seat number for the next available seat?

D 11 D 12 F 8 E 14 C12 F 9 E13

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

0 solutions

No explanations have been posted yet. Check back later!

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...