Google SDE Interview Questions- 2025 January| Monotonic Stacks (2-in-1 Combo) |Off-campus

Google · Question · Posted Jun 2026

Question 1: Largest Rectangle in Histogram Problem Statement Given an array of integers heights representing the histogram's bar heights where the width of each bar is 1, return the area of the largest solid rectangle in the histogram. Constraints 1 <= heights.length <= 105 0 <= heights[i] <= 104 Example Input: heights = [2,1,5,6,2,3] Output: 10 Explanation: The absolute largest rectangle is formed by the bars with heights 5 and 6. Area = Height(5) * Width(2) = 10. Question 2: ...

The full answer & interview discussion are available to premium members.

Log in Create a free account