Python Read Large Binary Search Algorithm Java