I was trying to solve a code challenge but could not wrap my head around the math.
Your task is to construct a building which will be a pile of n cubes. The cube at the bottom will have a volume of $n^3$, the cube above will have volume of $(n-1)^3$ and so on until the top which will have a volume of $1^3$.
You are given the total volume $m$ of the building. Being given $m$ can you find the number $n$ of cubes you will have to build?
So the equation for the volume of a stack is $n^3 + (n-1)^3 + ... + 1^3 = m$.
How do I find the value of $n$?