Learn from real interview experiences shared by the community
You can search for a specific company, or by a title
(python) write a function for a slides-and-ladder game (length of N), which gets the board matrix, step size (from cube) and current position [x,y] as an array. Return the player position after the turn., if exceeded the board return [-1,-1]. The board steps are from down to up (in contradiction to regular metrics that the 0 is up). the steps are from left to right in the odd lines and from right to left in the even. Matrics values are strings: "L" for a square which is part of a ladder, "S" for slides, empty string for all the other cells. The ladders are vertical only, the slides can be both horizontal and vertical.