Category "greedy"

Distirbute Candy - Finding minimum reproducible example of the problem

The question is to distribute candies to N children.Each child has a rating. Distribution should be such that each child have at least one candy and children wi

Can you figure out corner cases that might fail for this code?

Recently I gave an online coding interview where I was asked the following question - Largest possible square that can be built by cutting two sticks: We want

Longest K Sequential Increasing Subsequences

Why I created a duplicate thread I created this thread after reading Longest increasing subsequence with K exceptions allowed. I realised that the person who wa

Covering segments by points

I did search and looked at these below links but it didn't help . Point covering problem Segments poked (covered) with points - any tricky test cases? Need eff