You have an array of positive integers. When you pick an element with value :
You earn points
Delete THAT ONE element you chose
Delete ALL elements equal to and Here's the key: you don't delete all occurrences of itself.
You only delete the one element you picked. Other elements with value can still be picked later. Goal: get the highest total points.