Maximize events attended given date ranges | Salesforce Coding Question