← Questions
Sort rows by the weight of a bouncing diagonal path
0
I was asked this
No reports yet. Sign in to say where you were asked it.
In a square matrix, start a path at each cell of the first column. The path steps one column right and one row up each time; once it reaches the top row it turns and steps one column right and one row down until it reaches the last column. A start cell's weight is the sum of the values on its path. Sort the start cells by weight, breaking ties by the start cell's own value, and return the start values in that order.
No official answer yet. Write yours on the right and run it.
Nothing published yet.
Sign in to submit your code; every attempt is kept here.
Write and test your solution herePython in your browser, the question's tests level by level, every submission kept for you.Sign in to start coding
