how to solve farmer frenzy problem?suggest me some approach
Farmer Frenzy approach problem
The problem can be reduced to finding the maximum rectangle area in a histogram, multiple times.
After each row, you calculate the histogram built until that row, and that calculate the maximum area rectangle in that histogram.
For better understanding , refer this -: