Question: Problem You are given an integer array A of size n; all numbers in A are non-negative. A represents a histogram where each bar has
Problem You are given an integer array A of size n; all numbers in A are non-negative. A represents a histogram where each bar has width 1 and the i-th bar has height A[i]. Our goal is to find the area of the largest rectangle in the histogram that is completely covered by bars. Assignment Implement a Divide & Conquer algorithm that solves the problem. In worst case, your implementation should run in O(n log n) time. Clearly state your Divide, Conquer, and Combine phase, as well as your base case. Do not use a segment tree
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
