Amazon interview question

Write a function that solves [insert CS101 problem here] and calculate the complexity.