Bank of America interview question

Basic to Complex