How To Review Code In Interviews
A practical checklist for reviewing interview code: correctness, edge cases, readability, complexity, maintainability, and testing.
Interview Prep
Practice finding bugs, design flaws, performance issues, and maintainability problems in real interview-style Java and Python code.
Start Here
Learn the checklist: correctness, edge cases, complexity, readability, maintainability, and design.
Showing 10 of 10 questions
A practical checklist for reviewing interview code: correctness, edge cases, readability, complexity, maintainability, and testing.
Review a Python function that accidentally shares a default list across calls.
Review Java code that compares strings or objects using == instead of equals().
Review Java code that removes items from a collection inside an enhanced for-loop.
Review Python code that catches every exception and hides failures.
Review Java code that assumes inputs and object fields are never null.
Review a Python class that accidentally shares a mutable list across all instances.
Review Java code that uses a mutable object as a HashMap key and causes lookups to fail after the key changes.
Review Python code where missing type hints make the function contract unclear.
Review Java code that reads a file using a stream but forgets to close the underlying resource.