Add tasks for all the new languages
This commit is contained in:
parent
9dc3c2bb62
commit
bba7bfd280
13208 changed files with 134745 additions and 0 deletions
11
Task/Binary-search/SequenceL/binary-search.sequencel
Normal file
11
Task/Binary-search/SequenceL/binary-search.sequencel
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
binarySearch(A(1), value(0), low(0), high(0)) :=
|
||||
let
|
||||
mid := low + (high - low) / 2;
|
||||
in
|
||||
-1 when high < low //Not Found
|
||||
else
|
||||
binarySearch(A, value, low, mid - 1) when A[mid] > value
|
||||
else
|
||||
binarySearch(A, value, mid + 1, high) when A[mid] < value
|
||||
else
|
||||
mid;
|
||||
Loading…
Add table
Add a link
Reference in a new issue