Given an array of integers heights representing the histogram's bar height where the width of each bar is 1, return the area of the largest rectangle in the histogram.
Example 1:
Input: heights = [2,1,5,6,2,3]
Output: 10
Explanation: The largest rectangle has an area of 10 units (formed by heights 5 and 6).
Example 2:
Input: heights = [2,4]
Output: 4
1 <= heights.length <= 10^50 <= heights[i] <= 10^4