Interview Prep

Code Review

Practice finding bugs, design flaws, performance issues, and maintainability problems in real interview-style Java and Python code.

Start Here

How To Review Code In Interviews

Learn the checklist: correctness, edge cases, complexity, readability, maintainability, and design.

Showing 10 of 10 questions

How To Review Code In Interviews

A practical checklist for reviewing interview code: correctness, edge cases, readability, complexity, maintainability, and testing.

Code ReviewInterview StrategyDebuggingMaintainability

Python Code Review: Mutable Default Argument

Review a Python function that accidentally shares a default list across calls.

Code ReviewPythonFunctionsBugs

Java Code Review: == vs equals()

Review Java code that compares strings or objects using == instead of equals().

Code ReviewJavaStringsEquality

Java Code Review: Modifying a Collection While Iterating

Review Java code that removes items from a collection inside an enhanced for-loop.

Code ReviewJavaCollectionsBugs

Python Code Review: Bare except and Swallowed Errors

Review Python code that catches every exception and hides failures.

Code ReviewPythonExceptionsDebugging

Java Code Review: NullPointerException Risk

Review Java code that assumes inputs and object fields are never null.

Code ReviewJavaNull SafetyBugs

Python Code Review: Mutable Shared State

Review a Python class that accidentally shares a mutable list across all instances.

Code ReviewPythonClassesBugsState

Java Code Review: Bad HashMap Key Design

Review Java code that uses a mutable object as a HashMap key and causes lookups to fail after the key changes.

Code ReviewJavaHashMapequalshashCodeImmutability

Python Code Review: Missing Type Hints

Review Python code where missing type hints make the function contract unclear.

Code ReviewPythonType HintsMaintainability

Java Code Review: Resource Leak with Streams and Files

Review Java code that reads a file using a stream but forgets to close the underlying resource.

Code ReviewJavaFilesStreamsResource Management