Amazon interview question

2 Problems to solve using a programming language