Merge and merge according to large numbers

People, please help me solve this problem without using plug-ins: Categorize within a certain range, and then group according to the maximum area. As the picture shows:

What determines the number of the range you want to group?

Something like that. Is there a better algorithm?

Hello
i think @rajeev_pulari gives you the main components to do the job set and sort. The main work he did was reconstructing the data you didn’t give. So in order to get better help you need to provide the data. Internalise the number in a number or integer component and publish it

@laurent_delrieu ,Thank you for reminding me that I have been inspired by @rajeev_pulari picture and it has been solved. Be sure to upload my Gh file next time