Databricks Software Engineer Interview Experience — Design a Hit Counter in a Key-Value Store
Company: Databricks
Role: Software Engineer
Round: Technical Screen
Seniority: General
Company: Databricks
Role: Software Engineer
Round: Technical Screen
Seniority: General
The interviewer emphasized that he wanted me to focus on analyzing my decisions and writing high quality code, etc.
The question was: design a hit counter in a key-value store. But it wasn't stated that directly at first — the interviewer built up the requirements step by step.
Design a key-value store -> asked me to think about the user experience
I said I'd use generics, but in the middle I made a really dumb mistake about the generics interface. The interviewer let me check the documentation and come back to fix it...... (I hate myself)
Wrote the simplest implementation as requested
Support the hit-count feature
Explain the reasoning, analyze the tradeoffs
I used a fixed array solution
Optimize the code to make it more reusable
Asked if there were any race conditions and how to fix them
I described the situation that could occur (concurrent) -> need to add a lock
But I didn't actually write the code for it
Then it just ended. Since I don't use Java in my day-to-day work, I was a bit clunky with some of the interfaces, and the interviewer didn't smile the whole time either, so I thought I'd flamed out in one round......
But I could tell he cared more about how I analyzed the problem and wrote high quality code. Thanks to the interviewer!!!