Back to Browse

Leetcode 1494(Hard) Parallel Courses II: Simple C++ Solution (O(3^n))

3.8K views
Sep 20, 2020
45:48

In this video, I provide a simple solution with an explanation to the Leetcode 1494: Parallel Courses II in the hard category. This problem is a NP-Complete problem equivalent to the DAG scheduling problem. So we use a combination of bit masking, dynamic programming, greedy pruning and recursion, to solve the problem in O(3^n) time. I also prove the time complexity.

Download

0 formats

No download links available.

Leetcode 1494(Hard) Parallel Courses II: Simple C++ Solution (O(3^n)) | NatokHD