Limited Time Offer:Up to 20% off Hello Interview Premium
Up to 20% off Hello Interview Premium 🎉
Hello Interview
Your Dashboard
System Design
Code
Low Level Design
Behavioral
AI Coding
New
ML System Design
Salary Negotiation
Interview Guides
Blog
System Design
Low Level Design
AI Coding
Behavioral
New
Interview Questions
Success Stories
System Design
Low-Level Design
New
Ask The Community
Discord
Mock Interviews
1:1 Mentorship
Refer a Friend
Pricing
Sign in / Sign up
Search
⌘K
Pricing

Tutor

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:

Google

Google


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Company
​
Level
All Regions
Region

Early May, 2026

Google

Google

Junior

You are tasked to implement the core HTTP routing logic of a new web framework similar to spring boot There should be 2 func, registerHandler and getHandler registerHandler(pattern:string) called when dev adds handler. add new URL pattern that can contain {parameters} getHandler(path:string) called when real URL is requested from sevice. Return correct pattern when string of null if none matches Ex: regigsterHandler("/home") getHandler("/home") returns /home getHandler("/users") returns null

Your account is free and you can post anonymously if you choose.

Hello Interview Premium

Recent interview questions
System Design Guided Practice
Exclusive content
Learn More
Questions
Meta SWE Interview QuestionsAmazon SWE Interview QuestionsGoogle SWE Interview QuestionsOpenAI SWE Interview QuestionsEngineering Manager (EM) Interview Questions
Learn
Learn System DesignLearn DSALearn BehavioralLearn ML System DesignLearn Low Level DesignGuided Practice
Links
FAQPricingGift PremiumHello Interview Premium
Legal
Terms and ConditionsPrivacy PolicySecurity
Contact
About UsProduct Support

7511 Greenwood Ave North Unit #4238 Seattle WA 98103


© 2026 Optick Labs Inc. All rights reserved.