Hack the Interview — Global (The Fundraising Problem)

Revision en3, by advitiyabrijesh, 2020-03-16 10:07:21

I was trying to solve this problem using dp, with states(mask1, mask2, idx), where mask1 tells me how many tables I have covered so far and mask2 tells me what are the tables I have covered so far with 'idx'th group, but it will surely timeout, any other suggestions to improve complexity or are there any other solutions?

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en3 English advitiyabrijesh 2020-03-16 10:07:21 5 Tiny change: 's me what is the table' -> 's me what are the table'
en2 English advitiyabrijesh 2020-03-16 09:53:15 2 (published)
en1 English advitiyabrijesh 2020-03-16 09:52:21 467 Initial revision (saved to drafts)