Decided to take a stab at “Binary Search: Ice Cream Parlor” challenge in Hacker Rank. If interested you can get the requirements at the following URL: https://www.hackerrank.com/challenges/ctci-ice-cream-parlor
The general idea is to solve the sum of two numbers. I will address more on the subject of sum of two numbers on the second part of this post.
It is nice that Hacker Rank has been putting links to short videos with some challenges. In this case there is a video on Binary Search by Gayle Laakmann McDowell author of “Cracking the Coding Interview”. I watched the video. It was simple and to the point. Gayle covers the subject with an implementation using a recursive approach which she then converts to a loop implementation. Continue reading “Ice Cream Parlor – Part I”