Databricks SDE OA 2025 | Petabyte Scale Dot Product & Spark Cluster Job Execution

Question · Posted Jun 2026

Problem 1 - Petabyte Scale Dot Product Problem Statement Databricks stores extremely large sparse vectors where most entries are zero. Instead of storing the complete vector, each vector is compressed into: [[index1, value1], [index2, value2], ...] Indices are sorted in strictly increasing order. Calculate the dot product of two sparse vectors. Constraints Constraint 1 ≤ Compressed Length ≤ 105 Vector Dimension ≤ 109 Indices are unique and sorted Test Case Input Output vec1 = [[0,1],[2,3],[4,5]] vec2 = [[1,2],[2,4],[4,2]] 22 Problem ...

The full answer & interview discussion are available to premium members.

Log in Create a free account