14 questions · from 3 interviews
Databricks interview questions
Every question candidates reported from their Databricks interviews, most frequently asked first. Each links to the write-up it came from, so you can see the round and how it went.
Databricks coding and DSA questions
- 01
Shortest Path in Fibonacci Trees
Fibonacci trees are binary trees which are recursively defined as follows: T0 is empty T1 consists of a single node. Tn consists of a root node, with T{n-2} as its left child, and T{n-1} as its right child. Examples: T0: T1: T2: \n T3: / \n \n Now, in order…
- 02
IP Address Access Control (CIDR Rules)
Given a set of rules, implement the function accessok to see if IP address is allowed or denied. Also, print the rules index because of which it is getting allowed or denied. If none of the rules match, deny it. vector<vector<string>> rules = {…
- 03
Design Tic Tac Toe (n*m, k tokens)
Design Tic Tac Toe for n m, matrix and k subsequent tokens Follow up: isrobot to let AI play randomly
- 04
KeyValueData Store with Load Monitoring
Create a keyValueData store which monitors the load on it. Had to implement these fuctions. class keyValueDataStore{ string put(string key, string value){ } string get(){ return “”; } // returns the number of get calls in last 5 mins int mesaureGetLoad(){…
- 05
Revenue Service with Referral Tracking
Create a revenue service that support the following operations: insert(int revenue): returns a unique and new customerId. Assciates the revenue with customerid. insert(revenue, refererid): does all the above operations and also adds the input revenue to the…
- 06
Nested Referral Revenue Calculation
What if a new function is required: getnestedreferral(customerId,referraldepth): returns customerid's revenue plus referraldepth additional revenue amounts. example: insert(10) - 0: 10 insert(20) - 1: 20 insert(30, 0) - 2: 30 and 0: 40 getnestedreferral(0,0)…
- 07
IP Address Matching with CIDR Blocks
Similar to this. https://leetcode.com/discuss/post/5743277/databricks-l5-sse-technical-phone-screen-l4zi/ But I had to return the result for an ip according to the first rule it matches. So I gave an liner time solution similar to above. There were multiple…
- 08
Represent Ref String using Source String Blocks with Deletion
Given a source string and ref string, represent ref string using blocks from source string for eg source : abc1234abcd ref: abcd123 we can use cover to define cov1 = [(7,11) (3, 6)] or cov2 = [(7,10), (10, 11), (3,6)] implement a function to delete index from…
- 09
BFS Problem (Databricks Phone Screen)
This question was exactly the same as described in the linked LeetCode Discuss post, which involved a Breadth-First Search (BFS) problem.
- 10
Finding a path between two nodes in a K-th order Fibonacci tree
The problem involved finding a path between two given nodes within a K-th order Fibonacci tree. I was asked this problem exactly as described in the provided Stack Overflow link.
Databricks system design questions
- 01
Design CachedFile Class for Remote Storage
You are given an interface StorageClient that allows downloading files from a remote storage system: getFileSize(uri) → returns the size of the file. fetch(uri, offset, length, buffer) → fetches length bytes starting at offset into buffer. Your task is to…
- 02
Durable Key Value Store Design (Single Machine Focus)
Design a durable key value store. This is a typical question from system design you can find it easily. But ofc with focus on above mentioned things. We talked about different cases and optimisations. It was pretty fun. This round is unique to Databricks.…
- 03
Design a Time-Windowed Key-Value Store with Load Instrumentation
I was asked to design a Map structure with put(string key, string value) and get(string key) methods. Additionally, it needed instrumentation methods like measureputload() and measuregetload() to return the average calls made within a 5-minute window. A…
Databricks behavioural and HR questions
- 01
Standard Behavioral Questions
Standard behavioral questions were asked.
Databricks interview questions FAQ
What questions are asked in Databricks interviews?
Candidates reported 14 distinct questions across 3 Databricks interviews. 10 coding and DSA questions, 3 system design questions, 1 behavioural and HR questions.