Back to Browse

Leetcode 207 Course Schedule (JavaScript)

163 views
May 20, 2022
26:55

A deeper dive into this course schedule problem. Illustrating both DFS and Kahn's Algorithm as solutions. 00:00 Intro 0:58 Quick Solution 04:31 Directed Acyclic Graph (DAG) 05:25 Topological Sort (DFA, Khan's Algorithm) 06:38 DFS 07:23 DFS JavaScript Code 07:25 - a) Using a memo and key properties to store visited path results 12:30 - b) Drying and optimizing the first approach (No need for memo object) 14:29 - c) DFS Optimized (Array data structure for graph) 17:13 Khan's Algorithm 21:39 Khan's Algorithm JavaScript Code 25:02 Wrapping Up Problem link: https://leetcode.com/problems/course-schedule/

Download

1 formats

Video Formats

360pmp436.6 MB

Right-click 'Download' and select 'Save Link As' if the file opens in a new tab.

Leetcode 207 Course Schedule (JavaScript) | NatokHD