American Express interview question

brain teaser, machine learning