/Binary-Search

Simply a binary search algorithm

Primary LanguagePythonEclipse Public License 2.0EPL-2.0

BINARY SEARCH ALGORITHM

Description

Created a binary search algorithm that searches an item in a string (with the items separated by commas).

Use Project

If you want to use the code on your computer follow the steps below but if you just need it for a short time go to the View Project section.

The code uses no package so no need to worry about that now to launch it just go to the folder where the file is stored and execute the command below (in a command prompt window).

python BinarySearch.py

(for that you'll need to have python in PATH, if you don't, go check this link)

From now you just have to enter your list with the elements separated by comas and the item your looking for as shown below.

Find 1 in 1,2,3

Here's the syntax of the main function if you need it :

BinarySearch([1,2,3],'3')

Unfortunately for now I can't host the python code, but you can run it by clicking the link on View Project then you just have to enter your list and the item you want to know the index in Stdin Inputs as shown below.

Find 1 in 1,2,3

(else I advise you to activate the interactive mode).

If it doesn't work you can paste my code in this compiler and add your items in Stdin Inputs (separated by commas) pass a line and enter the item you're looking for.