Bosch interview question

Create an algorithm with a given complexity, based on a specific problem.