Title / Description
Code def recursive(array, value, low, high) if (high < low) then return -1 # not found end mid = low + (high - low) / 2 if (array[mid] > value) then return recursive(array, value, low, mid - 1) elsif (array[mid] < value) then return recursive(array, value, mid + 1, high) else return mid # found end end
Author
Highlight as C C++ CSS Clojure Delphi ERb Groovy (beta) HAML HTML JSON Java JavaScript PHP Plain text Python Ruby SQL XML YAML diff code