Skip to content

A simple Node.js program that gives the seating arrangement of passengers for airplane seat layout with custom conditions.

License

Notifications You must be signed in to change notification settings

MoazHassan2022/airplane-seating-algorithm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Airplane Seating Algorithm

Table of Contents

Built With :

Getting Started

This is a list of needed instructions to set up your project locally, to get a local copy up and running follow these instructions.

  1. Clone the repository.

  2. Follow this article to install node js and npm Install Node js and npm.

  3. npm i && npm start "[[3,2],[4,3],[2,3],[3,4]]" "30"

Description

A simple Node.js program that gives the seating arrangement of passengers for airplane seat layout with custom conditions.

This program was built for a coding challenge, you can see the requirements file in documentation/requirements.pdf

Rules for seating:

  • Always seat passengers starting from the front row to back, starting from the left to the right.
  • Fill aisle seats first followed by window seats followed by center seats (any order in center seats)

Screenshots

  1. Example from requirements.

  2. Expected output.

  3. Output example (1), note that 0 means an empty seat.

  4. Output example (2).

About

A simple Node.js program that gives the seating arrangement of passengers for airplane seat layout with custom conditions.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published