Google · Onsite
RejectedGoogle New Grad Onsite: IP Prefix Matching and an Ambiguous Wildcard Rule Engine
Role: Software Engineer, New Grad
Result: Rejected
Report time: January 2026
Base problem: IP prefix matching
The candidate described the first problem only as a simple IP-prefix task and pointed to an external discussion for the full prompt. The original post itself does not preserve enough input, output, or matching detail to reconstruct the base problem honestly.
Follow-up: binary-signal rule engine
The follow-up involved patterns over 0, 1, and wildcard symbols, each mapped to a value. Given a concrete binary signal, find a matching rule and return its value.
The candidate explored dynamic programming similar to Wildcard Matching and DFS/BFS over a trie, estimating roughly O(N × L × P) for N patterns, pattern length L, and input length P.
However, the only long-form statement in the post was explicitly generated with GPT and contains unresolved conflicts:
- It asks for the “longest” matching pattern but examples use list-order priority.
- It defines
*as arbitrary-length matching but also says that is equivalent to regex., which normally matches one character. - A separate
.wildcard is also mentioned.
Because those conflicts change the judged behavior, no FastPrep practice link is asserted. Commenters debated trie, DP, greedy matching, and Aho-Corasick, but none of those comments resolved the contract.
Comments
0No comments yet — be the first to share what you know.