Machine Learning Intern Interview Questions

8,198 machine learning intern interview questions shared by candidates

You're given a matrix of integers, and from any position in the matrix, you can only move in 4 directions - up, down, right, left - and that too, only if the destination position has a lower value than the original position. Given the starting indices (position in the matrix), find the longest such path possible. For eg. For this matrix: m = [[1 4 2], [5, 2, 6], [3, 2, 7]] and a starting position m[1][2], which is 6, you cannot move "down" to m[2][2], since 7 > 6, but you can move left to m[1][1] and up to m[0][2]. What is the run time of the algorithm?
avatar

Machine Learning Engineer

Interviewed at A Thinking Ape

4.4
Dec 30, 2017

You're given a matrix of integers, and from any position in the matrix, you can only move in 4 directions - up, down, right, left - and that too, only if the destination position has a lower value than the original position. Given the starting indices (position in the matrix), find the longest such path possible. For eg. For this matrix: m = [[1 4 2], [5, 2, 6], [3, 2, 7]] and a starting position m[1][2], which is 6, you cannot move "down" to m[2][2], since 7 > 6, but you can move left to m[1][1] and up to m[0][2]. What is the run time of the algorithm?

Viewing 861 - 870 interview questions

Glassdoor has 8,198 interview questions and reports from Machine learning intern interviews. Prepare for your interview. Get hired. Love your job.