A simple answer would be, list the shapes with their area, and then sort them in descending order based on their area, finally get the top 5.
Also, like Bill had mentioned in the comment, you can ignore the
Dictionary
, and use
SortedDictionary
[
^]. That will sort the data automatically for you and you read them one by one. Please read this link to understand how this works. One heads however, if you will sort the data on the key, you might store only one shape for each weight.