Pinterest interview question

implement 2 functions: getNumOfEvents(), eventAccured()