Lead Software Engineer Interview Questions

2,139 lead software engineer interview questions shared by candidates

/* you are given N courses, from 0 to N-1. prerequisites[i] = [ai, bi], you must complete course bi before taking course ai. Return true if you are able to complete all the tasks. Else return false. Example 1: Input: numCourses = 2, prerequisites = [[1,0]] Output: true Explanation: There are a total of 2 courses to take. To take course 1 you should have finished course 0. So it is possible. Example 2: Input: numCourses = 5, prerequisites = [[1,0], [2, 0], [4, 3]] Output: false Explanation: There are a total of 2 courses to take. To take course 1 you should have finished course 0, and to take course 0 you should also have finished course 1. So it is impossible. */
avatar

Lead Software Engineer

Interviewed at Grab

3.8
Apr 8, 2021

/* you are given N courses, from 0 to N-1. prerequisites[i] = [ai, bi], you must complete course bi before taking course ai. Return true if you are able to complete all the tasks. Else return false. Example 1: Input: numCourses = 2, prerequisites = [[1,0]] Output: true Explanation: There are a total of 2 courses to take. To take course 1 you should have finished course 0. So it is possible. Example 2: Input: numCourses = 5, prerequisites = [[1,0], [2, 0], [4, 3]] Output: false Explanation: There are a total of 2 courses to take. To take course 1 you should have finished course 0, and to take course 0 you should also have finished course 1. So it is impossible. */

Viewing 1951 - 1960 interview questions

Glassdoor has 2,139 interview questions and reports from Lead software engineer interviews. Prepare for your interview. Get hired. Love your job.