diff --git a/.gitignore b/.gitignore
index c0c219b..69ad85d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -55,7 +55,7 @@ coverage.xml
*.pot
# Django stuff:
-*.log
+#*.log
local_settings.py
db.sqlite3
db.sqlite3-journal
@@ -122,3 +122,7 @@ dmypy.json
# Pyre type checker
.pyre/
+
+docs/extras.html
+docs/old_styles.css
+src/app/logs/previous-runs/*.log
\ No newline at end of file
diff --git a/.vscode/settings.json b/.vscode/settings.json
index e654785..2ff857f 100644
--- a/.vscode/settings.json
+++ b/.vscode/settings.json
@@ -7,5 +7,6 @@
"src/app/tests"
],
"python.testing.unittestEnabled": false,
- "python.testing.pytestEnabled": true
+ "python.testing.pytestEnabled": true,
+ "svg.preview.background": "transparent"
}
\ No newline at end of file
diff --git a/README.md b/README.md
index 3875fc0..3374dde 100644
--- a/README.md
+++ b/README.md
@@ -1,43 +1,97 @@
# Musical Chairs
-[![Deploy Jekyll](https://github.com/thomasthaddeus/musical-chairs/actions/workflows/jekyll-gh-pages.yml/badge.svg)](https://github.com/thomasthaddeus/musical-chairs/actions/workflows/jekyll-gh-pages.yml)
+[![Deploy Jekyll](https://github.com/thomasthaddeus/musical-chairs/actions/workflows/jekyll-gh-pages.yml/badge.svg)](https://github.com/thomasthaddeus/musical-chairs/actions/workflows/jekyll-gh-pages.yml) ![GitHub top language](https://img.shields.io/github/languages/top/thomasthaddeus/musical-chairs?logo=python&logoColor=yellow) ![GitHub repo size](https://img.shields.io/github/repo-size/thomasthaddeus/musical-chairs?logo=github)
-This project contains implementations of a seating arrangement algorithm using four different approaches: using a class, using Python's heapq module, using standalone functions, and using Python's zip function along with the built-in sorted function.
+## Table of Contents
+
+
+
+- [Musical Chairs](#musical-chairs)
+ - [Table of Contents](#table-of-contents)
+ - [Introduction](#introduction)
+ - [The Musical Chairs Problem](#the-musical-chairs-problem)
+ - [The Algorithm](#the-algorithm)
+ - [The Web Application](#the-web-application)
+ - [About the Project](#about-the-project)
+ - [Built With](#built-with)
+ - [Directory Structure](#directory-structure)
+ - [Files Overview](#files-overview)
+ - [Running the Tests](#running-the-tests)
+
+
+
+## Introduction
+
+This project is a simple web application that demonstrates the use of four different approaches to solving the musical chairs problem.
+
+## The Musical Chairs Problem
+
+Suppose that you are hosting a dinner party and have invited some number of guests. When the guests arrive, you realize that you don't have enough chairs for everyone. You decide to solve this problem by asking some of the guests to stand while the others sit. Your guests are all very close friends and have no preference for where they sit at the table, but you would like to maximize the number of guests sitting at the table.
+
+## The Algorithm
+
+The algorithm is implemented in four different ways. The basic idea is to sort the guests by their total number of friends. Then, starting with the guest with the most friends, assign them a seat at the table and remove them and all of their friends from the list of guests. Repeat this process until there are no guests remaining. The different implementations of the algorithm differ in how the guests are sorted.
+
+## The Web Application
+
+The web application is built using [Jekyll](https://jekyllrb.com). The source code for the web application is located in the `src` directory. The web application is deployed to GitHub Pages and can be accessed via the following link [Musical Chairs](https://apparellnstuff.me/musical-chairs/)
+
+## About the Project
+
+This project contains implementations of a seating arrangement algorithm using four different approaches:
+
+1. using a class
+2. using Python's `heapq` module
+3. using standalone functions
+4. using Python's `zip` function
+ - with the built-in `sorted` function.
+
+### Built With
+
+- [Python](https://www.python.org/)
+- [pytest](https://docs.pytest.org/en/6.2.x/)
+- [Jekyll](https://jekyllrb.com)
+
## Directory Structure
The project has the following directory structure:
-```markdown
+```bash
.
├── .gitignore
-├── LICENSE.md
+├── LICENSE
├── README.md
-├── src
-│ ├── logs
-│ │ ├── class.log
-│ │ ├── hq.log
-│ │ ├── standalone.log
-│ │ └── zip.log
-│ ├── _main
-│ │ ├── _decorators_main.py
-│ │ └── _functions_main.py
-│ ├── main.py
-│ ├── modules
-│ │ ├── __init__.py
-│ │ ├── with_classes.py
-│ │ ├── with_heapq.py
-│ │ ├── with_standalone.py
-│ │ └── with_zip_sorted.py
-│ └── tests
-│ ├── __init__.py
-│ ├── __pycache__
-│ ├── test_with_classes.py
-│ ├── test_with_heapq.py
-│ ├── test_with_standalone.py
-│ └── test_with_zip_sorted.py
-└── .vscode
- └── settings.json
+└── src
+ ├── app
+ │ ├── main.py
+ │ ├── pylint.rc
+ │ ├── logs
+ │ │ ├── class.log
+ │ │ ├── hq.log
+ │ │ ├── standalone.log
+ │ │ └── zip.log
+ │ ├── _main
+ │ │ ├── _decorators_main.py
+ │ │ └── _functions_main.py
+ │ ├── modules
+ │ │ ├── __init__.py
+ │ │ ├── with_classes.py
+ │ │ ├── with_heapq.py
+ │ │ ├── with_standalone.py
+ │ │ └── with_zip_sorted.py
+ │ └── tests
+ │ ├── __init__.py
+ │ ├── test_main.py
+ │ └── test_modules.py
+ ├── css
+ │ └── styles.css
+ └── js
+ ├── accordion.js
+ ├── dropdown_enhancements.js
+ ├── fetch.js
+ ├── myModal.js
+ └── smooth_scrolling.js
```
### Files Overview
@@ -48,14 +102,14 @@ The project has the following directory structure:
- `with_heapq.py`: Implementation of the algorithm using Python's heapq module.
- `with_standalone.py`: Implementation of the algorithm using standalone functions.
- `with_zip_sorted.py`: Implementation of the algorithm using Python's zip function along with the built-in sorted function.
-- `test_with_classes.py`, `test_with_heapq.py`, `test_with_standalone.py`, `test_with_zip_sorted.py`: These are pytest files for testing each of the four implementations.
+- `test_main.py`, `test_modules.py`: These are pytest files for testing each of the four implementations.
### Running the Tests
To run the tests, you will need to install pytest
-```python
-pip install pytest
-```
+ ```python
+ pip install pytest
+ ```
Then you can run pytest command from your terminal at the root directory of the project.
diff --git a/assets/fonts/Source_Code_Pro/OFL.txt b/assets/fonts/Source_Code_Pro/OFL.txt
new file mode 100644
index 0000000..366206f
--- /dev/null
+++ b/assets/fonts/Source_Code_Pro/OFL.txt
@@ -0,0 +1,93 @@
+Copyright 2010, 2012 Adobe Systems Incorporated (http://www.adobe.com/), with Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark of Adobe Systems Incorporated in the United States and/or other countries.
+
+This Font Software is licensed under the SIL Open Font License, Version 1.1.
+This license is copied below, and is also available with a FAQ at:
+http://scripts.sil.org/OFL
+
+
+-----------------------------------------------------------
+SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
+-----------------------------------------------------------
+
+PREAMBLE
+The goals of the Open Font License (OFL) are to stimulate worldwide
+development of collaborative font projects, to support the font creation
+efforts of academic and linguistic communities, and to provide a free and
+open framework in which fonts may be shared and improved in partnership
+with others.
+
+The OFL allows the licensed fonts to be used, studied, modified and
+redistributed freely as long as they are not sold by themselves. The
+fonts, including any derivative works, can be bundled, embedded,
+redistributed and/or sold with any software provided that any reserved
+names are not used by derivative works. The fonts and derivatives,
+however, cannot be released under any other type of license. The
+requirement for fonts to remain under this license does not apply
+to any document created using the fonts or their derivatives.
+
+DEFINITIONS
+"Font Software" refers to the set of files released by the Copyright
+Holder(s) under this license and clearly marked as such. This may
+include source files, build scripts and documentation.
+
+"Reserved Font Name" refers to any names specified as such after the
+copyright statement(s).
+
+"Original Version" refers to the collection of Font Software components as
+distributed by the Copyright Holder(s).
+
+"Modified Version" refers to any derivative made by adding to, deleting,
+or substituting -- in part or in whole -- any of the components of the
+Original Version, by changing formats or by porting the Font Software to a
+new environment.
+
+"Author" refers to any designer, engineer, programmer, technical
+writer or other person who contributed to the Font Software.
+
+PERMISSION & CONDITIONS
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of the Font Software, to use, study, copy, merge, embed, modify,
+redistribute, and sell modified and unmodified copies of the Font
+Software, subject to the following conditions:
+
+1) Neither the Font Software nor any of its individual components,
+in Original or Modified Versions, may be sold by itself.
+
+2) Original or Modified Versions of the Font Software may be bundled,
+redistributed and/or sold with any software, provided that each copy
+contains the above copyright notice and this license. These can be
+included either as stand-alone text files, human-readable headers or
+in the appropriate machine-readable metadata fields within text or
+binary files as long as those fields can be easily viewed by the user.
+
+3) No Modified Version of the Font Software may use the Reserved Font
+Name(s) unless explicit written permission is granted by the corresponding
+Copyright Holder. This restriction only applies to the primary font name as
+presented to the users.
+
+4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
+Software shall not be used to promote, endorse or advertise any
+Modified Version, except to acknowledge the contribution(s) of the
+Copyright Holder(s) and the Author(s) or with their explicit written
+permission.
+
+5) The Font Software, modified or unmodified, in part or in whole,
+must be distributed entirely under this license, and must not be
+distributed under any other license. The requirement for fonts to
+remain under this license does not apply to any document created
+using the Font Software.
+
+TERMINATION
+This license becomes null and void if any of the above conditions are
+not met.
+
+DISCLAIMER
+THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
+OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
+COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
+DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
+OTHER DEALINGS IN THE FONT SOFTWARE.
diff --git a/assets/fonts/Source_Code_Pro/README.txt b/assets/fonts/Source_Code_Pro/README.txt
new file mode 100644
index 0000000..2e57b72
--- /dev/null
+++ b/assets/fonts/Source_Code_Pro/README.txt
@@ -0,0 +1,79 @@
+Source Code Pro Variable Font
+=============================
+
+This download contains Source Code Pro as both variable fonts and static fonts.
+
+Source Code Pro is a variable font with this axis:
+ wght
+
+This means all the styles are contained in these files:
+ SourceCodePro-VariableFont_wght.ttf
+ SourceCodePro-Italic-VariableFont_wght.ttf
+
+If your app fully supports variable fonts, you can now pick intermediate styles
+that aren’t available as static fonts. Not all apps support variable fonts, and
+in those cases you can use the static font files for Source Code Pro:
+ static/SourceCodePro-ExtraLight.ttf
+ static/SourceCodePro-Light.ttf
+ static/SourceCodePro-Regular.ttf
+ static/SourceCodePro-Medium.ttf
+ static/SourceCodePro-SemiBold.ttf
+ static/SourceCodePro-Bold.ttf
+ static/SourceCodePro-ExtraBold.ttf
+ static/SourceCodePro-Black.ttf
+ static/SourceCodePro-ExtraLightItalic.ttf
+ static/SourceCodePro-LightItalic.ttf
+ static/SourceCodePro-Italic.ttf
+ static/SourceCodePro-MediumItalic.ttf
+ static/SourceCodePro-SemiBoldItalic.ttf
+ static/SourceCodePro-BoldItalic.ttf
+ static/SourceCodePro-ExtraBoldItalic.ttf
+ static/SourceCodePro-BlackItalic.ttf
+
+Get started
+-----------
+
+1. Install the font files you want to use
+
+2. Use your app's font picker to view the font family and all the
+available styles
+
+Learn more about variable fonts
+-------------------------------
+
+ https://developers.google.com/web/fundamentals/design-and-ux/typography/variable-fonts
+ https://variablefonts.typenetwork.com
+ https://medium.com/variable-fonts
+
+In desktop apps
+
+ https://theblog.adobe.com/can-variable-fonts-illustrator-cc
+ https://helpx.adobe.com/nz/photoshop/using/fonts.html#variable_fonts
+
+Online
+
+ https://developers.google.com/fonts/docs/getting_started
+ https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Fonts/Variable_Fonts_Guide
+ https://developer.microsoft.com/en-us/microsoft-edge/testdrive/demos/variable-fonts
+
+Installing fonts
+
+ MacOS: https://support.apple.com/en-us/HT201749
+ Linux: https://www.google.com/search?q=how+to+install+a+font+on+gnu%2Blinux
+ Windows: https://support.microsoft.com/en-us/help/314960/how-to-install-or-remove-a-font-in-windows
+
+Android Apps
+
+ https://developers.google.com/fonts/docs/android
+ https://developer.android.com/guide/topics/ui/look-and-feel/downloadable-fonts
+
+License
+-------
+Please read the full license text (OFL.txt) to understand the permissions,
+restrictions and requirements for usage, redistribution, and modification.
+
+You can use them in your products & projects – print or digital,
+commercial or otherwise.
+
+This isn't legal advice, please consider consulting a lawyer and see the full
+license for all details.
diff --git a/assets/fonts/Source_Code_Pro/SourceCodePro-Italic-VariableFont_wght.ttf b/assets/fonts/Source_Code_Pro/SourceCodePro-Italic-VariableFont_wght.ttf
new file mode 100644
index 0000000..25febab
Binary files /dev/null and b/assets/fonts/Source_Code_Pro/SourceCodePro-Italic-VariableFont_wght.ttf differ
diff --git a/assets/fonts/Source_Code_Pro/SourceCodePro-VariableFont_wght.ttf b/assets/fonts/Source_Code_Pro/SourceCodePro-VariableFont_wght.ttf
new file mode 100644
index 0000000..cd96a61
Binary files /dev/null and b/assets/fonts/Source_Code_Pro/SourceCodePro-VariableFont_wght.ttf differ
diff --git a/assets/fonts/Source_Code_Pro/static/SourceCodePro-Black.ttf b/assets/fonts/Source_Code_Pro/static/SourceCodePro-Black.ttf
new file mode 100644
index 0000000..cfc5f9f
Binary files /dev/null and b/assets/fonts/Source_Code_Pro/static/SourceCodePro-Black.ttf differ
diff --git a/assets/fonts/Source_Code_Pro/static/SourceCodePro-BlackItalic.ttf b/assets/fonts/Source_Code_Pro/static/SourceCodePro-BlackItalic.ttf
new file mode 100644
index 0000000..b9e96b2
Binary files /dev/null and b/assets/fonts/Source_Code_Pro/static/SourceCodePro-BlackItalic.ttf differ
diff --git a/assets/fonts/Source_Code_Pro/static/SourceCodePro-Bold.ttf b/assets/fonts/Source_Code_Pro/static/SourceCodePro-Bold.ttf
new file mode 100644
index 0000000..e034f70
Binary files /dev/null and b/assets/fonts/Source_Code_Pro/static/SourceCodePro-Bold.ttf differ
diff --git a/assets/fonts/Source_Code_Pro/static/SourceCodePro-BoldItalic.ttf b/assets/fonts/Source_Code_Pro/static/SourceCodePro-BoldItalic.ttf
new file mode 100644
index 0000000..7b354cc
Binary files /dev/null and b/assets/fonts/Source_Code_Pro/static/SourceCodePro-BoldItalic.ttf differ
diff --git a/assets/fonts/Source_Code_Pro/static/SourceCodePro-ExtraBold.ttf b/assets/fonts/Source_Code_Pro/static/SourceCodePro-ExtraBold.ttf
new file mode 100644
index 0000000..a66b0f4
Binary files /dev/null and b/assets/fonts/Source_Code_Pro/static/SourceCodePro-ExtraBold.ttf differ
diff --git a/assets/fonts/Source_Code_Pro/static/SourceCodePro-ExtraBoldItalic.ttf b/assets/fonts/Source_Code_Pro/static/SourceCodePro-ExtraBoldItalic.ttf
new file mode 100644
index 0000000..5041be4
Binary files /dev/null and b/assets/fonts/Source_Code_Pro/static/SourceCodePro-ExtraBoldItalic.ttf differ
diff --git a/assets/fonts/Source_Code_Pro/static/SourceCodePro-ExtraLight.ttf b/assets/fonts/Source_Code_Pro/static/SourceCodePro-ExtraLight.ttf
new file mode 100644
index 0000000..2b652af
Binary files /dev/null and b/assets/fonts/Source_Code_Pro/static/SourceCodePro-ExtraLight.ttf differ
diff --git a/assets/fonts/Source_Code_Pro/static/SourceCodePro-ExtraLightItalic.ttf b/assets/fonts/Source_Code_Pro/static/SourceCodePro-ExtraLightItalic.ttf
new file mode 100644
index 0000000..0345c21
Binary files /dev/null and b/assets/fonts/Source_Code_Pro/static/SourceCodePro-ExtraLightItalic.ttf differ
diff --git a/assets/fonts/Source_Code_Pro/static/SourceCodePro-Italic.ttf b/assets/fonts/Source_Code_Pro/static/SourceCodePro-Italic.ttf
new file mode 100644
index 0000000..ffbae58
Binary files /dev/null and b/assets/fonts/Source_Code_Pro/static/SourceCodePro-Italic.ttf differ
diff --git a/assets/fonts/Source_Code_Pro/static/SourceCodePro-Light.ttf b/assets/fonts/Source_Code_Pro/static/SourceCodePro-Light.ttf
new file mode 100644
index 0000000..aae9d48
Binary files /dev/null and b/assets/fonts/Source_Code_Pro/static/SourceCodePro-Light.ttf differ
diff --git a/assets/fonts/Source_Code_Pro/static/SourceCodePro-LightItalic.ttf b/assets/fonts/Source_Code_Pro/static/SourceCodePro-LightItalic.ttf
new file mode 100644
index 0000000..c1f3d4b
Binary files /dev/null and b/assets/fonts/Source_Code_Pro/static/SourceCodePro-LightItalic.ttf differ
diff --git a/assets/fonts/Source_Code_Pro/static/SourceCodePro-Medium.ttf b/assets/fonts/Source_Code_Pro/static/SourceCodePro-Medium.ttf
new file mode 100644
index 0000000..1e42b5e
Binary files /dev/null and b/assets/fonts/Source_Code_Pro/static/SourceCodePro-Medium.ttf differ
diff --git a/assets/fonts/Source_Code_Pro/static/SourceCodePro-MediumItalic.ttf b/assets/fonts/Source_Code_Pro/static/SourceCodePro-MediumItalic.ttf
new file mode 100644
index 0000000..580c00d
Binary files /dev/null and b/assets/fonts/Source_Code_Pro/static/SourceCodePro-MediumItalic.ttf differ
diff --git a/assets/fonts/Source_Code_Pro/static/SourceCodePro-Regular.ttf b/assets/fonts/Source_Code_Pro/static/SourceCodePro-Regular.ttf
new file mode 100644
index 0000000..daad874
Binary files /dev/null and b/assets/fonts/Source_Code_Pro/static/SourceCodePro-Regular.ttf differ
diff --git a/assets/fonts/Source_Code_Pro/static/SourceCodePro-SemiBold.ttf b/assets/fonts/Source_Code_Pro/static/SourceCodePro-SemiBold.ttf
new file mode 100644
index 0000000..7dc26d9
Binary files /dev/null and b/assets/fonts/Source_Code_Pro/static/SourceCodePro-SemiBold.ttf differ
diff --git a/assets/fonts/Source_Code_Pro/static/SourceCodePro-SemiBoldItalic.ttf b/assets/fonts/Source_Code_Pro/static/SourceCodePro-SemiBoldItalic.ttf
new file mode 100644
index 0000000..37595b0
Binary files /dev/null and b/assets/fonts/Source_Code_Pro/static/SourceCodePro-SemiBoldItalic.ttf differ
diff --git a/assets/img/chair.svg b/assets/img/chair.svg
new file mode 100644
index 0000000..15cb0cc
--- /dev/null
+++ b/assets/img/chair.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/docs/_index.html b/docs/_index.html
deleted file mode 100644
index 7b7aee5..0000000
--- a/docs/_index.html
+++ /dev/null
@@ -1,143 +0,0 @@
-
-
-
-
-
Header 1
-
Header 2
-
-
-
-
-
Data 1
-
Data 2
-
-
-
Data 3
-
Data 4
-
-
-
-
-
-
-
-
-
-
-
-
-
Modal Title
-
This is the content inside the modal.
-
-
-
-
-
-
-
-
-
-
- Hover over me
- Tooltip text
-
-
-
-
-
-
-
-
-
This is the content for Accordion 1.
-
-
-
-
-
This is the content for Accordion 2.
-
-
-
-
-
-
-
-
-
-
-
Welcome to Our Site
-
Discover amazing content and join our community.
-
-
-
-
-
-
-
Item 1
-
Item 2
-
Item 3
-
-
-
-
-
-
-
- Caption for the image
-
-
-
-
-
-
-
-
-
-
-
-
-
- Hover over me
- Tooltip text
-
-
-
-
-
This is the content for Accordion 1.
-
-
-
-
This is the content for Accordion 2.
-
-
-
-
-
-
Item 1
-
Item 2
-
Item 3
-
-
-
-
-
- Caption for the image
-
-
-
-
-
-
\ No newline at end of file
diff --git a/docs/cloud_features.md b/docs/cloud_features.md
index 3c76733..8b3cd18 100644
--- a/docs/cloud_features.md
+++ b/docs/cloud_features.md
@@ -1,5 +1,3 @@
-Implementing the features mentioned, especially with a cloud server, is a multi-step process. Here's a high-level overview of how you can achieve this:
-
### 1. Setting Up a Cloud Server:
**a. Choose a Cloud Provider**:
@@ -113,4 +111,4 @@ gem install sorcery
**d. Monitoring and Alerts**: Use tools like New Relic or Datadog to monitor your server and application performance.
-This is a high-level overview, and each step has its intricacies. Depending on your exact requirements and the complexity of your application, you might need to adjust or add steps. If you'd like a deep dive into any specific step or need further assistance, please let me know!
+This is a high-level overview, and each step has its intricacies.
diff --git a/docs/index_bkup.html b/docs/index_bkup.html
deleted file mode 100644
index b9ded2d..0000000
--- a/docs/index_bkup.html
+++ /dev/null
@@ -1,78 +0,0 @@
-
-
-
-
-
-
- Musical Chairs
-
-
-
-
-
-
-
Welcome to Musical Chairs
-
-
-
-
About
-
- This is a project by Thomasthaddeus. You can find more details in the
- README.
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/index.html b/index.html
index 742fb06..5e83eb7 100644
--- a/index.html
+++ b/index.html
@@ -1,76 +1,115 @@
+
-
-
- Musical Chairs
-
+
+
+ Musical Chairs
+
+
-
-
Welcome to Musical Chairs
-
-
-
-
-
About
-
This is a project by Thomasthaddeus. You can find more details in the README.
+
+
Welcome to Musical Chairs
+
+
+
+
The Algorithm
+
The algorithm is implemented in four different ways. The basic idea is to sort the guests by their total number
+ of friends. Then, starting with the guest with the most friends, assign them a seat at the table and remove them
+ and all of their friends from the list of guests. Repeat this process until there are no guests remaining. The
+ different implementations of the algorithm differ in how the guests are sorted.
+
Using a Class
+
The first implementation uses a class to represent the guests. The class has two attributes: the total number
+ of friends and a list of the guest's friends. The class also has a method to calculate the total number of
+ friends and a method to remove a guest and all of their friends from a list of guests.
+
Using Python's heapq Module
+
The second implementation uses Python's heapq module to sort the guests by their total number of friends. The
+ heapq module is a priority queue implementation. It is used here to sort the guests by their total number of
+ friends in descending order. This approach requires that the guests be represented as a list of tuples
+ containing the total number of friends and the list of friends.
+
Using Standalone Functions
+ The third implementation uses standalone functions to sort the guests by their total number of friends. The first
+ function calculates the total number of friends for a given guest. The second function sorts the guests by their
+ total number of friends in descending order. This approach requires that the guests be represented as a list of
+ tuples containing the total number of friends and the list of friends.
+
Using Python's zip Function
+
The fourth implementation uses Python's zip function along with the built-in sorted function to sort the guests
+ by their total number of friends. The zip function takes two lists and returns a list of tuples containing the
+ corresponding elements of each list. The sorted function takes a list of tuples and sorts them by the first
+ element of each tuple. This approach requires that the guests be represented as two lists: one containing the
+ total number of friends and the other containing the list of friends.
+
+
+
+
About
+
+ This is a project by Thomasthaddeus. You can find more details in
+ the
+ README.
+
Contributions are welcome! Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+ .github
+
+
+
+
+
+
+
+
+
+
+
Contributing
+
+ Contributions are welcome! Please read
+ CONTRIBUTING.md for details on our
+ code of conduct, and the process for submitting pull requests to
+ us.
+