Off-by-One Errors and How to Avoid Them - Binary Search Variations & Edge Cases | OneNoughtOne