Frage im Vorstellungsgespräch bei Amazon

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