Binary Search
PureBinarySearchPerforms a binary search on a sorted array. Returns the index or -1.
Type: Pure (no side effects)
Category: Fortuna|Array & Collection
Keywords: array & collection
Inputs
| Name | Type | Default | Description |
|---|---|---|---|
| SortedArray | TArray<int> | — | SortedArray parameter |
| Value | int | — | Value parameter |
Outputs
| Name | Type | Description |
|---|---|---|
| ReturnValue | int | ReturnValue output |
Example Use Cases
Example 1
Fast lookup in a sorted ID table.
Example 2
Find a score threshold in sorted ranking data.