WC 3.1 Sumo Wrestling

John is conducting a sumo wrestling competition for the first time. He has a list of all the competitors and their weights. He wants to group them up and decides that the difference between the weight of each of the members of a group  should not be more than 1. He wants to make one huge group and other small groups. Help him calculate the number of people that he can accommodate in the biggest group.

Example: For the group {63 65 66 68 67 65} the biggest group size is 3. This is as the biggest group will have the participants of weight 65, 66, 65 as the difference between any 2 participants’ weight is not more than 1.

You are required to find the maximum group size for people with this set of weights: {66 68 67 67 61 66 67 120 120 120 65 120 118 61 116 66 61}

Click to view hint

This challenge is worth 60 points.

You must be logged in to submit a solution

View ranklist for this challenge
About scoring and submission

Contact Us

Krish Shah : 9323115454

Kaustubh Khavnekar : 9769408039

Privacy Policy