Time Complexity :-The counter function is O(n) and binary search is log(max_val-min_val). Hence, the time complexity is is O(n*log(max - min))
Right-click 'Download' and select 'Save Link As' if the file opens in a new tab.