Leetcode Weekly contest 325 - Hard - Number of Great Partitions

preview_player
Показать описание
In this video we discuss the fourth problem of Leetcode Weekly contest 325

Рекомендации по теме
Комментарии
Автор

Good solution. In today's contest, I got stuck with a test case for 4th problem. I forgot to add mod after taking the difference. Silly mistake.

cwmayank
Автор

If you don't mind, can you explain me the formula that you were subtracting 2 times of dp(n, k-1) from 2^n?

charanganesh