← 返回 jpmorgan 的题目列表Code Review: Identify Issues in a Teammate’s Changes Before Merge
类型:online_judge
Task: Code Review (Pre-merge Review)
You will be given a piece of code that a teammate has pushed before merging (could be backend service code, a script, or a module implementation). You have 30 minutes to review it and provide feedback.
What you need to do
Restate the goal/functionality of the code in your own words.
Identify issues or risks and explain why. Try to cover several of the following dimensions:
Correctness: potential bugs, null/empty handling, missing error handling
Edge cases: empty input, extreme values, retries, idempotency
Readability/Maintainability: naming, structure, duplication, comments/docs
Performance: unnecessary loops/IO, time complexity, memory usage
Security: input validation, injection risks, leaking secrets in logs, authz checks
Concurrency/Consistency: race conditions, locking, thread-safety, transaction boundaries
Testability: ease of unit testing, missing critical tests
Propose concrete improvements (refactor ideas, additional tests, or a better approach).
Output format
Provide bullet-pointed review comments.
For each issue include: description, impact, and recommended fix.
Note
The actual code is provided during the interview; you do not need to deliver fully runnable code, but your proposed changes should be precise and actionable.