Binary Search Solution for Koko Eating Bananas

Day 71 of 365 Days of code qn 1) koko eats banana approach: binary search 1) set low=1 and high= max(piles) 2) find mid=low+(high-low) 3) traverse the entire array and check if the number of hours taken by the current rate of consumption is less than the threshold hours if yes set high=mid-1 4) else low=mid+1 #365daysOfCode #NeetCode  #leetcode  #DSA  #python #LeetCode #ProblemSolving  #Algorithms #365dayschallenge

  • text

To view or add a comment, sign in

Explore content categories