The text says that there are 2n possible invitation lists, but naively there are 2^n invitation lists, one for every subset of the employees.
The phrasing is also somewhat ambiguous--is O(n * 2^n) considered "exponential time"? since the validity check and fun value of each possible invitation list take O(n) time to compute.
The text says that there are 2n possible invitation lists, but naively there are 2^n invitation lists, one for every subset of the employees.
The phrasing is also somewhat ambiguous--is O(n * 2^n) considered "exponential time"? since the validity check and fun value of each possible invitation list take O(n) time to compute.