Databricks数据相关面试真题

职位分类
全部
数据相关
计算机科学
人工智能
产品经理
BQ
面试题
全部(18)
SQL(1)
Coding(7)
ML basics(2)
Stats(0)
Product Case(0)
高频题(0)
Other(8)
全部(18)
SQL(1)
Coding(7)
ML basics(2)
Stats(0)
Product Case(0)
高频题(0)
Other(8)
1.Count Distinct Pairs with Similar Digits
2.Convert Snake Case to Camel Case in Substrings
3.Student with Highest Average Grade
4.Array Transformation Based on Characters
5.Valid Pair Count in Array
6.Valid Skeleton Word Count
7.Point Range Count
8.Maximum Sum Frame in a Matrix
9.Stock Price Analysis
10.Classification Metrics Comprehension
11.Understanding Linear Regression Assumptions
12.SQL Second Degree Follower Problem
13.Matrix Manipulation
14.Count Road Lamp Coverage
15.Rank Teams by Points
16.Binary String Operations
17.Bubble Match Game State
18.Calculate Waiting Time for the Next Bus
1. Count Distinct Pairs with Similar Digits
Given an array of numbers, count the number of distinct pairs in the input that have the same number of digits and exactly one different digit. A distinct pair is defined as 0 <= i != j < input.length, and input[i] < input[j]. The input array must satisfy 1 <= input[i] <= 10^9 and 1 <= input.length <= 10^4. Note that a brute force approach will fail 9 hidden cases. For example, given the input array [1, 151, 241, 1, 9, 22, 351], the output should be 3.
2. Convert Snake Case to Camel Case in Substrings
Given a string with special substrings nested in backticks (`), where the special substring contains variables and constants in snake case, with constants being in all caps (e.g., THIS_IS_A_CONSTANT), output a string with variables converted from snake case to camel case. For example, the input 'hi there `this_is_a_variable another_variable_` eheh `THIS_IS_A_CONSTANT` ' should be transformed to 'hi there `thisIsAVariable anotherVariable` eheh `THIS_IS_A_CONSTANT` '.
3. Student with Highest Average Grade
Given an array of strings in the format 'student: grade', where all students have unique names, determine the name of the student with the highest average grade. For example, given ['max: 100', 'toby: 100', 'max:95'], the output should be 'toby' since Max's average is (100+95)/2 = 97.5, and Toby's average is 100/1 = 100.
4. Array Transformation Based on Characters
Given an array of strings, transform the array such that every index i in the resulting array equals the first character of index i of the input array concatenated with the last character of the next index (i+1) of the input array. When i is the last index of the input array, the next index is considered to be 0.
5. Valid Pair Count in Array
Given an array, count all valid pairs where two numbers are of the same length and one number can become the other by changing just one digit. For example, given the array {1, 151, 241, 1, 9, 22, 351}, return 3 for the valid pairs: <1, 9>, <1, 9>, <151, 351>.