每日一练 | Data Scientist Business Analyst Leetcode 面试题 1205
发布于 2021-09-07 10:02 ,所属分类:2021面试经验技巧分享
点击上方蓝字 会变美

“
”
Sep.
6
Data Application Lab 自2017年6月15日起,每天和你分享讨论一道数据科学(DS)和商业分析(BA)领域常见的面试问题。
自2017年10月4日起,每天再为大家分享一道Leetcode 算法题。
希望积极寻求相关领域工作的你每天我们的问题并且与我们一起思考,我们将会在第二天给出答案。
“
”
DS Interview Question
Explain bagging.
BA Interview Question
Write a query in SQL to count number of unique patients who got an appointment for examination room C

LeetCode Question
Pascal’s Triangle II
Description:
Given an index k, return the kth row of the Pascal’s triangle.
Input: 3
Output: [1,3,3,1]
答案揭晓
DSInterview Question & Answer
How can you choose a classifier based on training set size?
If training set is small, high bias / low variance models (e.g. Naive Bayes) tend to perform better because they are less likely to be overfit.
If training set is large, low bias / high variance models (e.g. Logistic Regression) tend to perform better because they can reflect more complex relationships.
BA Interview Question & Answer
Write a query in SQL to find the name of the patients and the number of physicians they have taken appointment.

Answer:
SELECT p.name "Patient",
count(a.patient) "Appointment for No. of Physicians"
FROM appointment a
JOIN patient p ON a.patient=p.ssn
GROUP BY p.name
HAVING count(a.patient)>=1;
LeetCode Question & Answer
Pascal’s Triangle
Description:
Given numRows, generate the first numRows of Pascal’s triangle.
Input: 5
Output:
[
[1],
[1,1],
[1,2,1],
[1,3,3,1],
[1,4,6,4,1]
]
Solution:
模拟题,根据图上的规律来进行循环
注意防止数组越界
Code:

Time Complexity: O(n^2)
Space Complexity: O(1)
往期精彩回顾
新兴数据岗位:Analytics Engineer分析工程师是什么?
教你如何用神经网络和机器学习进行动态定价
不了解数据建模方法?看这篇就对了
数据科学家,知道这些统计知识就对了
想转行数据科学吗?这里有三种场景和方法




点击“”查看数据应用学院核心课程



![[JAVA面试题] 传智博客Java就业班面试资料java面试题(程序猿面试技巧+常见笔试题分析) 六讲](https://static.kouhao8.com/sucaidashi/xkbb/78347caafea46f36a69b5d05ca66ad05.png?x-oss-process=image/format,webp/resize,w_88/crop,w_88,h_88,g_nw)
![[就业指导] Java面试题专属视频 最新Java阿里京东美团滴滴java面试题及答案教程](https://static.kouhao8.com/sucaidashi/xkbb/be2bcf6c23bac0005fdd61e16024bd9c.png?x-oss-process=image/format,webp/resize,w_88/crop,w_88,h_88,g_nw)


![[JAVA面试题] Java BAT大型公司面试专属必备技能视频教程](https://static.kouhao8.com/sucaidashi/xkbb/faf2918ea254fd9be00db2eca82f6b78.png?x-oss-process=image/format,webp/resize,w_88/crop,w_88,h_88,g_nw)

![[就业指导] Java面试题视频找工作不用愁](https://static.kouhao8.com/sucaidashi/xkbb/979e2e0a2e6f5a53ab3c1bff94ed0e20.jpg?x-oss-process=image/format,webp/resize,w_88/crop,w_88,h_88,g_nw)

![JAVA面试题] 极客JavaWeb工程师全套视频教程 (初级+中级+高级) 一共485集 送面试辅导](https://static.kouhao8.com/sucaidashi/xkbb/439729a81224e1d2bd719383b03cd0dc.png?x-oss-process=image/format,webp/resize,w_88/crop,w_88,h_88,g_nw)

![[就业指导] Java面试专属视频 最新Java阿里京东美团滴滴面试题及答案教程](https://static.kouhao8.com/sucaidashi/xkbb/fb2f88633d9be374ae995992b13e7779.jpg?x-oss-process=image/format,webp/resize,w_88/crop,w_88,h_88,g_nw)
![[java面试题] 尚硅谷1024程序员福利之java学科新增面试宝典视频教程](https://static.kouhao8.com/sucaidashi/xkbb/f5826c371702bac5fb45b06bb7c24342.png?x-oss-process=image/format,webp/resize,w_88/crop,w_88,h_88,g_nw)




![[就业指导] 2017最新IOS面试必看题教程 尚学堂 iOS面试题 视频教程 教学视频](https://static.kouhao8.com/sucaidashi/xkbb/49649e1f340e7901b2b85424b87b24d4.png?x-oss-process=image/format,webp/resize,w_88/crop,w_88,h_88,g_nw)

![[Python] Python实战视频教程 基于Python项目与面试题讲解-Python核心技术进阶训练篇](https://static.kouhao8.com/sucaidashi/xkbb/ca6c1f3f4d1532b281ecdc1542c96831.jpg?x-oss-process=image/format,webp/resize,w_88/crop,w_88,h_88,g_nw)


![[项目实战] Python实战视频教程 Python核心技术进阶训练篇 基于Python项目与面试题](https://static.kouhao8.com/sucaidashi/xkbb/cce0cbfcce42787e572f6df16e475cc9.jpg?x-oss-process=image/format,webp/resize,w_88/crop,w_88,h_88,g_nw)

![[项目实战] Python实战视频教程 Python核心技术进阶训练篇 基于Python项目与面试题讲解](https://static.kouhao8.com/sucaidashi/xkbb/110e0fb426046bcd7b8eeef1cdf23231.png?x-oss-process=image/format,webp/resize,w_88/crop,w_88,h_88,g_nw)
![[iOS] 极客学院 高级编程课程视频 iOS开发工程师 全程培养计划 9.2G 讲解必会面试题](https://static.kouhao8.com/sucaidashi/xkbb/fed110993a9d98e708b2a116de6749bc.jpg?x-oss-process=image/format,webp/resize,w_88/crop,w_88,h_88,g_nw)
相关资源