Trainee Software Engineer Interview Questions

6,732 trainee software engineer 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.

A string is given which contains characters from the following set: ["|","*"]. Example, string can be of type "|**|*|". Also, two arrays are given. First array contains value of starting indexes, and second array contains value of ending indexes. For each corresponding pair of starting index array value and ending index array value you need to find maximum stars present in string between two bars that lies between starting index and ending index. Example: for string "|**|*|" and we have start index array[1,1] and end index array[5,6]. for pair (1,5) we have string "|**|*" so maximum stars between bar is 2. for pair (1,6) we have string "|**|*|" so maximum stars between bar is 3. So answer is [2,3].
avatar

Software Engineer Trainee

Interviewed at MountBlue Technologies

3.7
Nov 23, 2020

A string is given which contains characters from the following set: ["|","*"]. Example, string can be of type "|**|*|". Also, two arrays are given. First array contains value of starting indexes, and second array contains value of ending indexes. For each corresponding pair of starting index array value and ending index array value you need to find maximum stars present in string between two bars that lies between starting index and ending index. Example: for string "|**|*|" and we have start index array[1,1] and end index array[5,6]. for pair (1,5) we have string "|**|*" so maximum stars between bar is 2. for pair (1,6) we have string "|**|*|" so maximum stars between bar is 3. So answer is [2,3].

Viewing 1611 - 1620 interview questions

Glassdoor has 6,732 interview questions and reports from Trainee software engineer interviews. Prepare for your interview. Get hired. Love your job.