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.