Small correction to time complexity it should actually be O(p^2 * 2^s) because of the bin() function which compares the 2 values we get for number of people. That will take p time to execute, and we have that in the dp method. However, since p is only 60 max, this doesn't add much time complexity.
Small correction to time complexity it should actually be O(p^2 * 2^s) because of the bin() function which compares the 2 values we get for number of people. That will take p time to execute, and we have that in the dp method. However, since p is only 60 max, this doesn't add much time complexity.
okk thanks