Checkr interview question

Match names given the rules