Javascript Interview Questions

1,680 javascript interview questions shared by candidates

You are given a Maze in the size of NxM represented by a boolean matrix where 0 is empty, and 1 is blocked (wall). 1. Code a function 'solve1', which returns true if there's a path from points 's' (start) to 'e' (end) which passes only through zeros. It should return 'false' if there is no possible path. Possible movements: up, right, down, left (no diagonals) For example, this maze should return true: s 1 1 1 0 0 0 1 1 1 e 1 1 1 1 1 And this one should return false: s 1 1 1 0 1 0 1 1 1 e 1 1 1 1 1
avatar

Fullstack JavaScript Developer

Interviewed at Wix

4.1
Feb 4, 2021

You are given a Maze in the size of NxM represented by a boolean matrix where 0 is empty, and 1 is blocked (wall). 1. Code a function 'solve1', which returns true if there's a path from points 's' (start) to 'e' (end) which passes only through zeros. It should return 'false' if there is no possible path. Possible movements: up, right, down, left (no diagonals) For example, this maze should return true: s 1 1 1 0 0 0 1 1 1 e 1 1 1 1 1 And this one should return false: s 1 1 1 0 1 0 1 1 1 e 1 1 1 1 1

Viewing 851 - 860 interview questions

Glassdoor has 1,680 interview questions and reports from Javascript interviews. Prepare for your interview. Get hired. Love your job.