Interview Question
- 0of 0 votes
AnswersFind the best seat selection in online ticket booking system?
- jayesh30785 April 01, 2017 in India
For example if you want to book 5 seat, best selection is 5 consecutive seat. But if 5 consecutive seat is not available it select (3,2) because (4,1) is not a best solution,
same like if you want to book 10, if not available (8,2), (7,3), (6,4), (5,5)
You can assume seat arrangement is 2D matrix, where already book seat is 1, and available seat is 0.| Report Duplicate | Flag | PURGE
Email me when people comment.
Email me when people comment.
Loading...
An error occurred in subscribing you.
Interview Type: In-Person
Email me when people comment.
Email me when people comment.
Loading...
An error occurred in subscribing you.
CareerCup is the world's biggest and best source for software engineering interview preparation. See all our resources.