Taro Logo
Profile picture

Stripe Interview Guide

Process Quality

With 51% of Software Engineers reporting a positive experience, 23% reporting a neutral experience, and 26% reporting a negative experience, Software Engineers overall have very good feelings towards Stripe's interview process.

+26

Interview Toughness

Stripe's interview process is very selective, failing most Software Engineers who go through it. Only 17% of Software Engineers pass while the remaining 83% are rejected.

17%

Showing 3 of 368 interview experiences

Software Engineer

Software Engineer

Bucharest, Romania • February 1, 2024

Neutral ExperienceNo Offer

Process

Phone screen:

It contains a code-shared session with an interviewer (you can use your own IDE). String manipulation mostly, and validation of some edge cases. It is formed as an HTTP problem, but in reality, is just a method parsing two input parameters.

Questions

Part 1

In an HTTP request, the Accept-Language header describes the list of languages that the requester would like content to be returned in. The header takes the form of a comma-separated list of language tags. For example:

Accept-Language: en-US, fr-CA, fr-FR

This means that the reader would accept:

  • English as spoken in the United States (most preferred)
  • French as spoken in Canada
  • French as spoken in France (least preferred)

We're writing a server that needs to return content in an acceptable language for the requester, and we want to make use of this header. Our server doesn't support every possible language that might be requested (yet!), but there is a set of languages that we do support. Write a function that receives two arguments: an Accept-Language header value as a string and a set of supported languages. The function should return the list of language tags that will work for the request. The language tags should be returned in descending order of preference, following the same order as they appeared in the header.

In addition to writing this function, you should use tests to demonstrate that it is correct, either via an existing testing system or one you create.

Examples:

python parse_accept_language( "en-US, fr-CA, fr-FR", # the client's Accept-Language header, a string ["fr-FR", "en-US"] # the server's supported languages, a set of strings )

returns: ["en-US", "fr-FR"]

parse_accept_language("fr-CA, fr-FR", ["en-US", "fr-FR"])

returns: ["fr-FR"]

parse_accept_language("en-US", ["en-US", "fr-CA"])

returns: ["en-US"]