Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sam-peach/guest-list-bst
https://github.com/sam-peach/guest-list-bst
Last synced: 23 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/sam-peach/guest-list-bst
- Owner: sam-peach
- Created: 2019-05-30T14:54:35.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2022-12-10T17:47:09.000Z (about 2 years ago)
- Last Synced: 2024-11-06T20:19:19.161Z (2 months ago)
- Language: JavaScript
- Size: 282 KB
- Stars: 0
- Watchers: 1
- Forks: 3
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Setup
---
`npm i`
`npm test`
Follow the link in your console.## Guest List
---
Your task is to write a BST that can take people's first names (as a string) and store them under the correct letter of the alphabet.
Each node in the BST must contain a linked list that holds all the name that begins with its index letter. For example, if my party has three guests: Adam, Alice and Brian the BST will have two nodes (one for "A" and one for "B"), node "A" will have a linked list that contains "A" (the head), "Adam" and "Alice" and node "B" will contain "B"(the head) and "Brian".
New names must either be added to the correct existing linked list, or a new node and linked list must be created to house them.
Here is a graphic for a BST guest list with 8 names:
![](./img/bstVisual-02.jpg)