Chessboard Cube Stacks
Total cubes on a 20 by 20 chessboard is an easy quant interview question on Pure Math.
This problem considers a rectangular grid where each cell contains a stack of cubes whose height increases in a regular pattern as you move across rows and down columns. The heights are determined by a simple linear rule in the row and column indices, so the board forms a slanted "ramp" of cube counts from one corner to the opposite side. The task is to compute the total number of cubes placed on the board, given that rule and the dimensions of the grid. Questions of this form appear frequently in pure-maths style screening for quant and data roles that want comfort with manipulating sums over grids.
To answer it cleanly, a candidate needs to translate the verbal stacking rule into a compact algebraic expression in two indices, then recognize that the total is a double sum with a separable linear structure. It leans heavily on reindexing and splitting sums, using standard formulas for arithmetic series and careful handling of constants. Interviewers watch for the ability to move from a concrete picture to symbolic notation, to organize the summation efficiently, and to avoid brute-force or ad hoc counting.
What it tests
When a grid or array is filled according to a rule that depends linearly on the coordinates (such as $i + j - 1$ for row $i$, column $j$), the total can be efficiently computed by exploiting the separability of sums. The key is that linear functions of multiple variables can be split into sums over each variable independently, allowing you to reduce a seemingly complex double sum into a combination of simpler, well-known formulas (like the sum of the first $n$ integers). This works because addition distributes over summation, and constants or terms involving only one index can be factored out of the inner sum. The underlying structure is that of a separable function over a rectangular domain, which always allows this decomposition. This principle holds because the total contribution from each coordinate accumulates in a predictable, additive way across the grid.
Practise this question with written feedback, or hear it in a spoken mock interview.
Get started free