As reported: ServiceNow Senior Software Engineer (IC3, full stack) loop, round 1 (coding), Apr 2025: two coding problems, JavaScript output questions, and an open-ended bank transactions design.
height[i] is the height of a vertical line at x = i. Choose two lines; together with the x-axis they form a container holding min(height[i], height[j]) · (j − i) water. Return the maximum.
This is LeetCode 11 — Container With Most Water.
Example
[1,8,6,2,5,4,8,3,7] -> 49 (lines at 1 and 8: min(8,7) · 7)
[1,1] -> 1
Constraints: 2 ≤ n ≤ 10^5; 0 ≤ height[i] ≤ 10^4.
Code runner format: one line with height. Implement maxArea(height); the harness prints the area.