Pergunta de entrevista da empresa FloQast

Given an array of objects: array = [ {user='1', keyPress='A'}, {user='2', keyPress='A'}, {user='1', keyPress='C'}, ....] return an array with all the users that typed in keys in the following sequence 'AC' e.g. [1]