Stripe Interview Question

Phone interview: How do you build an "accept-language" parser with region/language/wildcard filtering