Binary Search

Search a sorted array by repeatedly dividing the search interval in half

Algorithmia Platform License
· Internet Access

This algorithm has Internet access.

This is necessary for algorithms that rely on external services, however it also implies that this algorithm is able to send your input data outside of the Algorithmia platform.
· Calls Other Algorithms

This algorithm has permission to call other algorithms.

This allows an algorithm to compose sophisticated functionality using other algorithms as building blocks, however it also carries the potential of incurring additional royalty and usage costs from any algorithm that it calls.

Run an Example

"Hello class BinarySearch {\n  def apply(input: String): String = {\n    \"Hello \" + input\n  }\n}\n"

Install & Use


curl -X POST -d '"class BinarySearch {\n  def apply(input: String): String = {\n    \"Hello \" + input\n  }\n}\n"' -H 'Content-Type: application/json' -H 'Authorization: Simple YOUR_API_KEY'