-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6a6f957
commit 0a7ce3a
Showing
1 changed file
with
16 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Binary-Search | ||
Implementation of searching algorithms binary search | ||
|
||
|
||
Algorithm: | ||
|
||
1- Select the element in the middle of the array. | ||
|
||
2- Compare the selected element to the searched element, if it is equal to the searched element, terminate. | ||
|
||
3- If the searched element is larger than the selected element, repeat the search operation in the major part of the selected element. | ||
|
||
4- If the searched element is smaller than the selected element, repeat the search in the smaller part of the selected element. | ||
|
||
5- Repeat the steps until the smallest index in the search space is less than or equal to the largest index. | ||
|