Pregunta de entrevista de American Express

Basic algorithm questions that can be figured out pretty easily.