MaxAB interview question

easy problem solving, low level code design, basic system design