Skip to content

miwied/FancySeatManager

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 

Repository files navigation

FancySeatManager

Imagine a restaurant with a big round table surrounded by n seats. The FancySeatManager is an algorithm that determines if there are enough contiguous seats for a group of x people and always selects the most efficient seat for them so that the restaurant owner can accommodate as many guests as possible.

FancySeatManager - explanation image

implementation

I implemented this algorithm in C# as a console application and aswell in JavaScript with a neat visualization of the seats and groups.
It was a nice programming exercise and an interesting comparison of these two programming languages and the usage of the different implementation options.

features

  • setting a number of n seats
  • adding a group of x people
  • auto generated incremental group-id
  • remove a group with the corresponding group-id
  • notification when group is set or no more space is available

javascript web application pictures

main view create 20 seats


adding a group of 3 people not enough space anymore


remove group with the id 2

c# console application pictures

create 10 seats adding a group of 3 people


remove group with the id 2

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published