Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/swistak-codes/binary-search
Code from blog article
https://github.com/swistak-codes/binary-search
Last synced: about 2 months ago
JSON representation
Code from blog article
- Host: GitHub
- URL: https://github.com/swistak-codes/binary-search
- Owner: swistak-codes
- License: mit
- Created: 2020-11-07T12:03:28.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2020-11-26T21:19:14.000Z (about 4 years ago)
- Last Synced: 2024-05-02T22:01:07.650Z (8 months ago)
- Language: JavaScript
- Size: 43.9 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Binary search
Repository with code for [blog](https://swistak.codes) entry about binary search and other search methods in list structure. You can find whole article here: https://swistak.codes/wyszukiwanie-w-listach/
Comments are in Polish, since blog article is also in Polish.
## Apps
All of the apps require NodeJS (latest LTS) to be installed on your machine.
### number-guess
Simple number guessing game showing binary search capabilities. Can be checked here: https://codesandbox.io/s/number-guess-cl937
Running instructions:
```bash
cd ./number-guess
npm install
npm run start:dev
```### binary-search-stats
App for generating CSVs with statistics about binary search. Runs in two modes — collecting how many comparisons is needed to find each number in a sequence or collecting average number of comparisons for different sizes of sets. Can be checked here: https://repl.it/@tswistak/binary-search-stats#index.js (index.js slightly modified to allow running from repl.it environment)
Running instructions:
```bash
cd ./binary-search-stats
npm install
npm run comparisons 0 100
npm run averages 5 10000
```### interpolation-search-stats
App for generating CSVs with statistics about interpolation search. Runs similarly as binary-search-stats. However, here as an additional argument we're providing the name of number generator. Available ones are: oneToN, arithmetic, geometric, random, gaussian. Can be checked here: https://repl.it/@tswistak/interpolation-search-stats#index.js
Running instructions:
```bash
cd ./binary-search-stats
npm install
npm run comparisons oneToN
npm run comparisons arithmetic
npm run comparisons geometric
npm run comparisons random
npm run comparisons gaussian
```