forked from algorithm-visualizer/algorithm-visualizer
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdesc.json
More file actions
18 lines (18 loc) · 863 Bytes
/
desc.json
File metadata and controls
18 lines (18 loc) · 863 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
{
"Binary Search": "Binary Search is a search algorithm that finds the position of a target value within a sorted array. It works by comparing the target value to the middle element of the array; if they are unequal, the lower or upper half of the array is eliminated depending on the result and the search is repeated in the remaining subarray until it is successful.",
"Applications": [
"Finding values in a sorted collection",
"Traversing binary search trees"
],
"Complexity": {
"time": "worst O(log(N)), best O(1), average O(log(N))",
"space": "worst O(log(N)) - recursive, O(1) - iterative"
},
"References": [
"<a href='https://en.wikipedia.org/wiki/Binary_search_algorithm'>Wikipedia</a>"
],
"files": {
"recursive": "Recursively searching a sorted array",
"iterative": "Iteratively searching a sorted array"
}
}