Coding & Algorithms (DSA)
Code Comprehension & Debugging
6 practice questions. Free questions open a full answer guide; the rest unlock with Pro.
- You're handed a bug that reproduces reliably in production, but it vanishes the moment you attach a debugger or add log statements. How do you reason about what's happening and how do you actually catch it?
- A teammate's code launches one goroutine (or async callback) per item inside a loop, and each one closes over the loop variable to log or process that item. In code review they're confused because every goroutine ends up acting on the last item, not its own. Walk me through what's happening and how you'd fix it.Go Pro
- Here's a Python function: `def add_tag(tag, tags=[]): tags.append(tag); return tags`. A teammate reports that the second time they call `add_tag('x')` they get back `['x', 'x']` instead of `['x']`. Walk me through what's happening and how you'd fix it.Go Pro
- You can reliably reproduce a bug that you don't yet understand. Walk me through how you'd go from 'I can trigger it' to finding the actual cause.Go Pro
- A teammate's method walks a list with an enhanced for-each loop and calls the list's remove() inside it to drop items that match a filter. It throws ConcurrentModificationException in production but passed their local test. Walk me through why it fails, why the test missed it, and how you'd fix it.Go Pro
- A bug that wasn't there last month is now in production, and the affected code path passes through hundreds of recent commits. How do you systematically find which change introduced it instead of reading every diff?Go Pro
Want questions matched to your role? Paste a job title, job description, or CV for a personalized set, or go Pro to unlock the full bank.