Giter VIP home page Giter VIP logo

airplane-seating-algo's Introduction

Airplane Seating Aglorithm built for an interview

alt text

A simple node.js program that helps seat passengers in a flight based on the following input and rules.

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)

Input to the program will be

• a 2D array that represents the rows and columns [[3,4],[4,5],[2,3],[3,4]]
• Number of passengers waitng in queue.

How to build and run

 git clone https://github.com/robavelii/airplane-seating-algo
 cd ariplane-seating-algo
 npm install
 Input: "<seat_layout>" "<passengers_count>"
 Example: node index.js "[[3,2],[4,3],[2,3],[3,4]]" "30"

airplane-seating-algo's People

Contributors

robavelii avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.