Preparing for an interview? Check out Cracking the Coding Interview
Published on

Stripe | Dublin | Backend | Rejected | L2

Author
  • Shared Anonymously

Stripe Interview experience

Location: Dublin
Level: L2
Years of Exp: 2 years

Resume shortlisting

First step was resume shortlisting. I applied for the role directly on https://stripe.com/en-gb-pl/jobs and after a weeks I was contacted by the recruiter.

Recruiter call

A call was scheduled with the recruiter when she told me everything about the process, expectations, etc. She then told me that there will be a screening round followed by on-site if screening goes well.

Screening (1 hour)

After basic introduction from both the side, interview started with DSA based question.
Question
You are given a string S of \'Y\' and \'N\' seperated by spaces like: Y N N Y N Y Y N. Where S[i] represents if there are any customers waiting on our shop on i<sup>th</sup> day.
We are also given index ind on which we will open close the shop. We need to find what will be the total loss if we close the shop on ind day.
There will be a loss of 1 if we closed the shop on i<sup>th</sup> day and there exist any customer waiting on day after i.
Similary loss of 1 if we are open on i<sup>th</sup> day and there are no customer before i.

Eg: S= "Y N N Y N Y Y N" and ind = 2
Ans: 1 (1 day when no customer is there before ind 2) + 3 (3 days when customers are waiting after ind 2) = 4

Verdict-1
I gave the brute force approach to check for number of N on left of ind, and number of Y on right of ind.
Interviewer asked me to code it as he did not want to me optimize it. He asked me to write the complete code (main function, creating the structure to take and print testcases).
I initially assumed S does not contain spaces in between, but when I completed my code he then told me to consider this \uD83E\uDD72
It took me 30 minutes to write this because of this confusion.
I modified this and it got executed.

He then asked the follow-up question.
Follow-up 1
Find the day when loss is minimum

Verdict-2
It was super easy, just iterate for all the ind and find the minimum. I coded this in like 2-3 minutes. And running his test cases took 5 more minutes \uD83D\uDE42

Follow-up 2
Finally he showed me the bigger picture. And told me that there are some logs and which contains this kind of pattern. For each valid pattern you have to print the pattern and find minimum loss for that.
Logs would be like: \\ L R L R \ \ mtswioehdvdfoj R L R /t/n it could be very random.

Verdict-3
I ran out of time since I already took around 40 minutes to solve the above 2 parts. But I explained him the approach that we will first extract these log and then apply the same computation on each log.

Conclusion
After 2 days I got the email from the recruiter that they are not moving forward with my application.
My overall experience was good. You need to be very fast in their interview. It is always good to ask questions before related to the formating, how input is provided to avoid any last minute changes in your code.
Also, I don't think solving the 2nd followup could be done in the time provided even I would have completed other parts a bit early. Happy to know your opinions on this :)

ReportMark as Helpful