Databricks India Interview Experience (L5) Rejected
Anonymous User
8357

YOE: 6 years.

I recently had an opportunity to interview at databricks. There were a total of 5 rounds scheduled as follows.

  1. 2 Coding round. (It was expected to write fully working code.)
  2. 1 Algo design round (Fully working code wasn't expected.)
  3. 1 HLD.
  4. 1 HM.

I was sent a rejection email post first 3 rounds.

Round 1: It was a coding round, I was asked to implement a class SluggishArray which would have below 2 functions.

1. Map(Function<Integer, Integer>): SluggishArray -> This method would accept a function which needs to be applied to all the array elements.
2. getIndexOf(int value): Integer -> This method would find the asked value in the array as if all the asked map functions has been applied over the array. (Map functions can be chained).

Also, as a follow up, I was asked to only do the required operations so that we could find the first value in the array. Ex: 1,2,3,2 was the array and the map was called to multiply each element by 2 and the getIndexOf was called to find value of 4. Then we should only apply the operation till index 1 (0-based). Was able to solve this with a fully working solution.

Post that I was asked to think for all the possible test cases. (Missed 1 important test case)

Round 2: It was a topological sorting based question where parent to child DAG was given. We had to start with nodes with 0 children and move up the tree. So the main task were to Inverse the DAG to be able to do BFS (Topological sorting.) The objective was to find all the nodes which were executed alone at their respective level. Was able to write the fully working solution. Didn't use visited set for inversing the DAG (though I was able to explain how it would be implemented but there was no time left.)

Round 3: Was asked to write algorithm for WebCrawler where a starting webpage and a max depth allowed was given. There were pre build function provided to fetch HTML of webpage, parse and extract URL's from a given page.

Firstly, It was said the fetch and parse functions are single threaded. (Wrote a BFS search solution.)

Then, I was asked how would you know that multi-threading can help here. (Gave explanation that each webpage can be handled independently also fetch and parse are single threaded so the thread is waiting wasting processing unit, which could be better utilized with parallel threads.) I wrote the code how I would make it multi threaded.

This round went really great.

Comments (8)