Match Noisy License Plate Reads Against a Watchlist
Last updated: November 29, 2026
Quick Overview
A camera's OCR returns a plate string that may confuse look-alike characters (0/O, 8/B, 5/S) and may have one missing, extra, or wrong character. Return every watchlist plate that matches the read under those rules.
Verkada
November 29, 20260
0
0 solved
A camera's OCR returns a plate string that may confuse look-alike characters (0/O, 8/B, 5/S) and may have one missing, extra, or wrong character. Return every watchlist plate that matches the read under those rules.
Verkada license plate recognition lets customers set alerts for plates of interest, and OCR at night or at an angle is rarely perfect. The interviewer wants a correct one-edit comparison with a custom equality, then a conversation about scaling past a linear scan.
What the Interviewer Expects
- Normalizes input (case, spaces, dashes) before comparing
- Implements one-edit-distance in a single linear pass instead of full DP
- Treats confusable pairs as free matches through a clean helper
- Rejects length differences greater than one immediately
- Discusses indexing the watchlist for large lists and false positive cost
Key Topics to Cover
How to Approach This
- Clarify input constraints and edge cases before writing code.
- Walk through your approach verbally and confirm with the interviewer before coding.
- Start with a brute force solution, then optimize. Mention time and space complexity.
- Test your solution with examples, including edge cases like empty input or duplicates.
- Consider common patterns: sliding window, two pointers, hash map, BFS/DFS, dynamic programming.
Possible Follow-up Questions
- The watchlist has 2 million plates from a stolen-vehicle feed. How do you avoid scanning all of them per read?
- How would you rank multiple candidate matches?
- Should confusable swaps be capped? What is the false positive trade-off for a security alert?
Sharpen Your Skills on Codemia
Practice similar problems with our interactive workspace, get AI feedback, and track your progress.
Practice DSA ProblemsSample Answer
Requirements
Confusable swaps cost nothing. In addition, allow at most one real edit: substitute, insert or delete. Compare case-insensitively and ignore spaces and dashes in the read....
High-Level Design
Full Levenshtein is O(nm) per pair; with a budget of one edit a two-pointer walk is enough. When characters disagree, spend the edit: advance the longer string's pointer if lengths differ, otherwise b...