Refactor binary search non recursive and add test
Refactor recursive binary search