def findMin(arr, left, right):
if left == right:
return arr[left]
else:
m = (left + right) >> 1
a = findMin(arr, left, m);
b = findMin(arr, m + 1, right)
if a < b:
return a
else:
return b
def main():
arr = [1,23,-13,421,5,10];
min = findMin(arr, 0, len(arr) -1)
print(min)
main()
ZGVmIGZpbmRNaW4oYXJyLCBsZWZ0LCByaWdodCk6CgogICAgaWYgbGVmdCA9PSByaWdodDoKICAgICAgICByZXR1cm4gYXJyW2xlZnRdCiAgICBlbHNlOgogICAgICAgIG0gPSAobGVmdCArIHJpZ2h0KSA+PiAxCiAgICAgICAgYSA9IGZpbmRNaW4oYXJyLCBsZWZ0LCBtKTsKICAgICAgICBiID0gZmluZE1pbihhcnIsIG0gKyAxLCByaWdodCkKICAgICAgICBpZiBhIDwgYjoKICAgICAgICAgICByZXR1cm4gYQogICAgICAgIGVsc2U6CiAgICAgICAgICAgcmV0dXJuIGIKCmRlZiBtYWluKCk6CgogICAgYXJyID0gWzEsMjMsLTEzLDQyMSw1LDEwXTsKICAgIG1pbiA9IGZpbmRNaW4oYXJyLCAwLCBsZW4oYXJyKSAtMSkKICAgIHByaW50KG1pbikKCm1haW4oKQ==