databrick intern OA | databricks codesigna oa | Interview Experience Sharing

Databricks OA

Databricks, a company almost unknown in the programmer community and headquartered in San Francisco, aims to help organizations manage data and improve performance through big data + machine learning technologies, with Spark, the famous open source big data processing tool, being the company's star product.

Databricks OA is done on the Codesignal platform.70 minutes for 4 topics, fully videotapedSurveillance, language is not limited. Time is still tight.

Databrick Intern OA 1 (Difficulty Easy)

The question asks us to create a square of size n given an integer n and using this integer. The sides of the square should consist of * Characters are formed, and the inside of the square consists of spaces.

We need to construct an N × N matrix with a square bounded by * characters, and spaces inside the square.

The Python code and explanations are given below:

Databrick Intern OA 1 Code

Description:coding create_square_frame function first checks whether n is legal, and then uses * Construct the top and bottom boundaries, flanked by the center rows of the *, with spaces filled in the middle. Overall time complexity O(n).

Databrick Intern OA 2 (Difficulty Easy)

Given an object of size N × M matrix. Define a "bouncing diagonal" as: start from the leftmost cell, move along the diagonal (up-right), and when it encounters the upper and lower boundaries of the matrix, bounce back vertically to continue. For each cell on the leftmost side, calculate the sum of the elements on the bouncing diagonal as weights.

The Python code and explanations are given below:

Databrick Intern OA 2 Code

Calculate the weights:For row i in the left column, traverse along the bounce diagonal and accumulate all elements to obtain the weights.
Sort:Form a tuple (weight, value) of each element and its weight, sort by weight in ascending order; if the weights are the same, then by value in ascending order, and finally return the sorted array of values in the left column.

Overall, the first two Databrick OA questions are not too difficult, and you can quickly write your thoughts by reading the question stem carefully.

Contact Us

After our powerfulInterview assistance, OA ghostwriters, Candidates have demonstrated not only programming skills but also clear thinking and effective communication skills by parsing and communicating on these topics. These experiences are not only applicable to Databricks interviews, but also enhance the ability to solve actual programming problems. I wish you all good luck in your interviews!

author avatar
ProgramHelp
END
 0
Comment(没有评论)