每日一練 | Data Scientist & Business Analyst & Leetcode 面試題 527

尋夢新聞LINE@每日推播熱門推薦文章,趣聞不漏接❤️

加入LINE好友

Jan.

16

Data Application Lab 自2017年6月15日起,每天和你分享討論一道數據科學(DS)和商業分析(BA)領域常見的面試問題。

自2017年10月4日起,每天再為大家分享一道Leetcode 算法題。

希望積極尋求相關領域工作的你每天關注我們的問題並且與我們一起思考,我們將會在第二天給出答案。

Day

427

DS Interview Question

Can you cite some examples where a false negative important than a false positive?

BA Interview Question

Write a query in SQL to find the name of the patients who taken the appointment on the 25th of April at 10 am, and also display their physician, assisting nurses and room no.

每日一練 | Data Scientist & Business Analyst & Leetcode 面試題 527

每日一練 | Data Scientist & Business Analyst & Leetcode 面試題 527

LeetCode Question

Rotate Image

Deion:

You are given an n x n 2D matrix representing an image.

Rotate the image by 90 degrees (clockwise).

You have to rotate the image in-place, which means you have to modify the input 2D matrix directly.

DO NOT allocate another 2D matrix and do the rotation.

Input:

[

[1,2,3],

[4,5,6],

[7,8,9]

],

Output:

[

[7,4,1],

[8,5,2],

[9,6,3]

]

Day

426

答案揭曉

DS Interview Question & Answer

What is confidence interval?

Answer:

In statistics, a confidence interval is a type of interval estimate that is computed from the observed data. A confidence interval gives an estimated range of values which is likely to include an unknown population parameter, the estimated range being calculated from a given set of sample data.

The confidence level is the frequency (i.e., the proportion) of possible confidence intervals that contain the true value of their corresponding parameter. Confidence intervals consist of a range of values (interval) that act as good estimates of the unknown population parameter.

The desired level of confidence is set by the researcher (not determined by data). Most commonly, the 95% confidence level is used.However, other confidence levels can be used, for example, 90% and 99%.

BA Interview Question & Answer

Write a query in SQL to find the name of the patients and the number of the room where they have to go for their treatment.

每日一練 | Data Scientist & Business Analyst & Leetcode 面試題 527

每日一練 | Data Scientist & Business Analyst & Leetcode 面試題 527

Answer:

SELECT p.name AS “Patient”,

a.examinationroom AS “Room No.”,

a.start AS “Date and Time of appointment”

FROM patient p

JOIN appointment a ON p.ssn=a.patient;

LeetCode Question & Answer

Permutations II

Deion:

Given a collection of numbers that might contain duplicates, return all possible unique permutations.

Input: [1,1,2]

Output: [[1,1,2],[1,2,1],[2,1,1]]

Solution:

Permutation 的 follow up,經典的去重題

與combination一樣,要選代表,不同的就是combination是通過start記錄歷史,而permutation是使用set

去重第一個要想到排序

去重的部分使用註釋標識了

每日一練 | Data Scientist & Business Analyst & Leetcode 面試題 527