Implement HTTP Route Matching for a Web Framework
Implement two functions, `registerHandler(pattern)` and `getHandler(path)`, that form the core routing logic of a web framework. `registerHandler` adds URL patterns (which may include `{parameter}` placeholders) to the router, while `getHandler` matches an incoming request path against registered patterns and returns the matching pattern or null if none exists.
Asked at:
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Late July, 2026
Mid-level
Late June, 2026
Senior
Late May, 2026
Senior
Hello Interview Premium
Your account is free and you can post anonymously if you choose.