Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/multicatch/binarysearch
A little binary search project in a few languages for school
https://github.com/multicatch/binarysearch
Last synced: 28 days ago
JSON representation
A little binary search project in a few languages for school
- Host: GitHub
- URL: https://github.com/multicatch/binarysearch
- Owner: multicatch
- License: gpl-2.0
- Created: 2015-09-02T16:11:07.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2015-09-12T18:56:26.000Z (about 9 years ago)
- Last Synced: 2023-03-11T04:55:38.987Z (over 1 year ago)
- Language: C
- Size: 223 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# binarysearch
This set of programs and scripts asks user some questions and guesses their number.
### C
To run this C program, you need gcc and make. Only after compiling you can run "binarysearch" program. You can always compile it without make by using
```sh
$ gcc -o binarysearch code/make.c code/binsort.c
```
It uses a defined struct as a class. Elements are defined in bs_local.h, but methods are in binsort.c. Works in console. Calls guess() for all questions and result.### Java
I already compiled Java. To run the app, cd to build and use
```sh
$ java binarysearch.BinarySearch
```
Also make sure you *have* Java installed.
It uses binarysearch.searcher.BinSearcher class (object actually) and prints getGuessedValue. The class itself asks user some questions in console.### JavaScript
There's a class that returns the result after a few confirmation dialogues. You just need to add script tag, create a new BinarySearch object and get guessed number using guess(). You can also use html file for demo.### Python
You need to run it with Python 3. Simply use:
```sh
$ python3 binarysearch.py
```
It creates an object from BinarySearch class and prints getGuessed() result. Also asks a couple of questions in console.License
----GNU General Public License v2.0. See [LICENSE](https://github.com/SudoWaster/binarysearch/blob/master/LICENSE) file.
Feel free to distibute, change this source code or even learn from it!