Google interview question

Write code that does X, with a good error-handling mechanism, fast runtime, and good decomposition.