Painter's Partition Problem | Unexpected Binary Search Use | Python Code

preview_player
Показать описание
Use of binary search to solve painter's partition problem in an elegant manner. Similar procedure is followed for several other popular problems like "Allocating minimum number of pages".
Explanation of problem 00:00
Explanation of solution 04:06
Code for "possible" function 11:13
Time complexity analysis 18:13

Link to practice the above concept -

Complete Code -

This video is the part of the 'Handpicked' binary search series where I will try to share all the different scenarios where binary search comes handy. If you haven't yet, checkout the complete series. I will be uploading more videos soon, so subscribe to stay updated!

Connect with me on -
Рекомендации по теме
Комментарии
Автор

Finally someone who explained it well. Thanks!

googlable
Автор

Nice explanation !! One doubt though. Why return False if painters == 0 in possible() function ? If it's the last painter and job is assigned to him, why do we return False. I thought we should return False if painter < 0, isn't it ?

VarunMittal-viralmutant
Автор

bhai boht accha explain kia, please aur banao

gammastrain
join shbcf.ru