Databricks SDE Interview Question 2023 August | Two Pointers | On-campus
Question · Posted Jun 2026
Question 1: Trapping Rain Water Problem Statement Given n non-negative integers representing an elevation map where the width of each bar is 1, compute how much water it can mathematically trap after raining. Water can only be trapped if there are taller solid blocks on BOTH the left and the right sides of a pit to form a valid container boundary. Constraints n == height.length 1 <= n <= 2 * 104 0 <= height[i] <= 105 Examples Example 1: ...
The full answer & interview discussion are available to premium members.
Log in Create a free account