There's no special math you need to learn. You have a system of equations (sum and product) that you can manipulate to reduce the Big(O) of your algorithm. Not sure if that helps (without giving the answer away).
First test creates 2 blocks and asks for values of 1st one. Your error message Expected: 3, instead got: 1 indicates the 2d block you created crashed data of 1st one. (3 is value of 1st Block width, 1 is value of 2d Block width)
So it seems the problem is with your code.
Good luck!
This comment is hidden because it contains spoiler information about the solution
There's no special math you need to learn. You have a system of equations (sum and product) that you can manipulate to reduce the Big(O) of your algorithm. Not sure if that helps (without giving the answer away).
This comment is hidden because it contains spoiler information about the solution
The math and algebra behind the solution (at least the most popular and efficient solutions) are not so complicated.
This comment is hidden because it contains spoiler information about the solution
On the side note always format your code using Markdown. An extract from Markdown link -
Try using
row = row.concat("\\n");
Instead ofrow = row.concat("\n");
. Then check your output with the text fixture code manually.First test creates 2 blocks and asks for values of 1st one. Your error message
Expected: 3, instead got: 1
indicates the 2d block you created crashed data of 1st one. (3
is value of 1st Block width,1
is value of 2d Block width)So it seems the problem is with your code.
Good luck!
which language ?