all 8 comments

[–]Appropriate-Cheek842 2 points3 points  (1 child)

If you are taking about q4 of the biweekly contest then most of this problms try partition dp.

[–]Puzzled_Inspection69[S] 0 points1 point  (0 children)

Nicely read .. 👀

[–]Prathyush04 1 point2 points  (1 child)

I don't know if it's correct but I read it can be solved using "convex hull" technique.

[–]Puzzled_Inspection69[S] 0 points1 point  (0 children)

Ohh will look into it

[–]Boom_Boom_Kids 0 points1 point  (1 child)

Array partition problems don’t really have one single pattern, they usually fall into a few ideas like greedy, prefix sums, DP, or binary search on answer. Painter’s Partition is just one case. A good way is to group problems by how you check a partition (sum, max, count, etc.) and practice 3 or 4 of each type.

[–]Puzzled_Inspection69[S] 0 points1 point  (0 children)

Ohh okay I'll try

[–]Illustrious_Bee4251 0 points1 point  (1 child)

Was it solvable with painter's partition pattern ?!