Amazon interview question

check if elements of one string exist in a 2nd string