Software Trainee Interview Questions

9,112 software trainee interview questions shared by candidates

Give a nXn matrix, a rover is placed at first cell of the matrix i.e. (0,0). Also a list of commands is provided in the form of list. Commands include values from following set: ["LEFT","RIGHT","UP","DOWN"]. You need to find position of rover after last command is executed on nXn matrix. Rover must not cross the boundaries of given matrix. If command results in position outside the boundaries of matrix then rover must stay at current position.
avatar

Software Engineer Trainee

Interviewed at MountBlue Technologies

3.7
Nov 23, 2020

Give a nXn matrix, a rover is placed at first cell of the matrix i.e. (0,0). Also a list of commands is provided in the form of list. Commands include values from following set: ["LEFT","RIGHT","UP","DOWN"]. You need to find position of rover after last command is executed on nXn matrix. Rover must not cross the boundaries of given matrix. If command results in position outside the boundaries of matrix then rover must stay at current position.

Viewing 2211 - 2220 interview questions

Glassdoor has 9,112 interview questions and reports from Software trainee interviews. Prepare for your interview. Get hired. Love your job.