3 ms·
> Manhattan Metric Nope. All border cells are supposed to be 0, but they have different Manhattan distances from the center. > Object is an instance of a clas
by jwilk 9y ago
> Manhattan Metric
Nope. All border cells are supposed to be 0, but they have different Manhattan distances from the center.
> Object is an instance of a class
Correct.
- StevePerkins 9y agoThe question statement above calls for border cells to have a height of "0 or 1". Perhaps to give the candidate some fudge-factor for matrices having an odd number height or width. I realize that this is a contrived testing problem, but to me a pyramid with zeros in the border cells sounds wrong. The area just beyond the border should be zero. Being within bounds of the pyramid intuitively should imply some non-zero height.
- roel_v 9y agoYeah borders being 0 is weird, but it's not material to the question, and for some reason someone once thought this was how it was supposed to work - I never cared about details like that.