Cloudflare Software Engineer interview onsite (reject)
Summary
I interviewed for a Software Engineer (Mid-Level) role at Cloudflare, which involved a phone screen and a 4-round onsite interview. Despite performing well in some rounds, I received a reject primarily due to my performance in the System Design round.
Full Experience
Phone screen:
You were given a list of partitions and partitions used, determine the min amount of partitions required to fit all partitions. Data can be moved in chunks.
For example:
paritions = [10, 15, 15, 20]
partitions_used = [5, 10, 15, 5]
output = 2
Explanation: 2 partitions of [15, 20] can accommodate [5, 10, 15, 5]
I came up with a O(N) space solution but with hint I got to optimal solution.
Solution was to just sort paritions in descending order and subtract total data at each index in partitions
Time: N log N
Space: O (1)
total_data = sum(partitions_used) partitions.sort(reverse=True) size = 0while size < len(partitions) and total_data > 0: total_data -= partitions[size] size += 1
return size
Onsite (4 interviews)
Coding:
Design hit counter: https://leetcode.com/problems/design-hit-counter/description/
I intially got it wrong after missing a test case, but later got to optimal solution. Also, answered follow-up questions.
System Design:
You were given an existing design of an edge data center, where the logs gets generated. Each edge DC is in different city (NYC, LA, SEA). You were tasked to transport the logs to a core datacenter.
Functional requirements:
1/ Logs need to be transported to a db in core datacenter
2/ Users should be able to query the logs in a centralised DB
Non-functional requirements:
1/ SLA for latency is 1 min on avg, max 15 mins
2/ Encryption at rest and transit
3/ Highly available (eventual consistency is accepted)
I designed using kafka. I intially used S3, Glue and Athena combo. I was asked to design this on premises data center (meaning no AWS, no GCP). I was asked specifically on how I would host it on premises. I got a working solution, did not do deep dive, lacked clarity on so many components, hence failed.
Project Retroscpective:
You need to talk about a project that I contributed to or a current project. You need to do a deep dive into the architecture. I think I did well, but very surprised to hear the interviewer marked me down by saying didn't have experience handling scale. I'm pretty sure I mentioned the service I worked receives upwards of 3 million requests per minute.
Behavioural interview (orange cloud):
Pretty standard, tell me about a situation questions. It's only 30 mins.
Overall, I knew I bombed system design. This is for a mid-level role. Recruiter told me I got a no-hire for system design. I guess that was the round that decided my fate.
Interview Questions (5)
You were given a list of partitions and partitions used, determine the min amount of partitions required to fit all partitions. Data can be moved in chunks.
For example:
paritions = [10, 15, 15, 20]
partitions_used = [5, 10, 15, 5]
output = 2
Explanation: 2 partitions of [15, 20] can accommodate [5, 10, 15, 5]
You were given an existing design of an edge data center, where the logs gets generated. Each edge DC is in different city (NYC, LA, SEA). You were tasked to transport the logs to a core datacenter.
Functional requirements:
1/ Logs need to be transported to a db in core datacenter
2/ Users should be able to query the logs in a centralised DB
Non-functional requirements:
1/ SLA for latency is 1 min on avg, max 15 mins
2/ Encryption at rest and transit
3/ Highly available (eventual consistency is accepted)
I was asked to design this on premises data center (meaning no AWS, no GCP). I was asked specifically on how I would host it on premises.
You need to talk about a project that I contributed to or a current project. You need to do a deep dive into the architecture.
Pretty standard, tell me about a situation questions.