Learn

Technical Interviews: Whiteboarding

Analyzing Time and Space Complexity

You’re satisfied with your implementation and you’ve demonstrated how it works, but you’re not quite done.

Analyze the time and space complexity of the solution. With this step you are demonstrating that you care about the efficiency of your code.

Explain your code’s big O notation. If you can optimize to a more efficient runtime, explain how that would work. If you can’t optimize, explain why it’s not possible.

Talk through the big O time and space complexity of your solution.

Explain how an optimization would be possible or not.