mirror of
https://github.com/autistic-symposium/master-algorithms-py.git
synced 2025-06-17 11:29:27 -04:00
Update README.md
This commit is contained in:
parent
b6faf3956b
commit
f2b423db58
1 changed files with 1 additions and 1 deletions
|
@ -7,7 +7,7 @@
|
||||||
* binary searching is composed of 3 sections:
|
* binary searching is composed of 3 sections:
|
||||||
* **pre-processing**: sort if collection is unsorted
|
* **pre-processing**: sort if collection is unsorted
|
||||||
* **binary search**: using a loop or recursion to divide search space in half after each comparison (`O(log(N)`)
|
* **binary search**: using a loop or recursion to divide search space in half after each comparison (`O(log(N)`)
|
||||||
* **post-processing`: determine viable candidates in the remaining space
|
* **post-processing**: determine viable candidates in the remaining space
|
||||||
|
|
||||||
* there are 3 "templates" when writing a binary search:
|
* there are 3 "templates" when writing a binary search:
|
||||||
* `while left < right`, with `left = mid + 1` and `right = mid - 1`
|
* `while left < right`, with `left = mid + 1` and `right = mid - 1`
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue