HackerEarth Mathison and the funny subarray problem solution - TheCScience