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

Описание к видео Leetcode 1494(Hard) Parallel Courses II: Simple C++ Solution (O(3^n))

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.

Комментарии

Информация по комментариям в разработке