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

“
”
Aug.
30
Data Application Lab 自2017年6月15日起,每天和你分享讨论一道数据科学(DS)和商业分析(BA)领域常见的面试问题。
自2017年10月4日起,每天再为大家分享一道Leetcode 算法题。
希望积极寻求相关领域工作的你每天我们的问题并且与我们一起思考,我们将会在第二天给出答案。
“
”
DS Interview Question
What is the difference between stochastic gradient descent (SGD) and gradient descent (GD)?
BA Interview Question
Write a query in SQL to obtain the name of the physicians who are trained for a special treatment.
Sample table: physician
Employeeid | name | position | ssn
------------+------------------------------+-------------------------------------------+---------------------
1 | John Dorian | Staff Internist | 111111111
2 | Elliot Reid | Attending Physician | 222222222
3 | Christopher Turk | Surgical Attending Physician | 333333333
4 | Percival Cox | Senior Attending Physician | 444444444
5 | Bob Kelso | Head Chief of Medicine | 555555555
6 | Todd Quinlan | Surgical Attenian | 666666666
7 | John Wen | Surgical Attending Physician | 777777777
8 | Keith Dudemeister | MD Resident | 888888888
9 | Molly Clock | Attending Psychiatrist | 999999999
Sample table: procedure
code | name | cost
------+-------------------------------------------+-------------
1 | Reverse Rhinopodoplasty | 1500
2 | Obtuse Pyloric Recombobulation | 3750
3 | Folded Demiophtalmectomy | 4500
4 | Complete Walletectomy | 10000
5 | Obfuscated Dermogastrotomy | 4899
6 | Reversible Pancreomyoplasty | 5600
7 | Follicular Demiectomy | 25
LeetCode Question
Add Two Linked Lists
Description:
You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers and return it as a linked list.
You may assume the two numbers do not contain any leading zero, except the number 0 itself.
答案揭晓
DSInterview Question & Answer
While working on a data set, how do you select important variables? Explain your methods.
Remove the correlated variables prior to selecting important variables
Use linear regression and select variables based on p values
Use Forward Selection, Backward Selection, Stepwise Selection
Use Random Forest, Xgboost and plot variable importance chart
Measure information gain for the available set of features and select top n features accordingly.
…
BA Interview Question & Answer
Write a query in SQL to count the number of unavailable rooms
Sample table: room
roomnumber | roomtype | blockfloor | blockcode | unavailable
-----------+----------+------------+-----------+-------------
101 | Single | 1 | 1 | f
102 | Single | 1 | 1 | f
103 | Single | 1 | 1 | f
111 | Single | 1 | 2 | f
112 | Single | 1 | 2 | t
113 | Single | 1 | 2 | f
121 | Single | 1 | 3 | f
122 | Single | 1 | 3 | f
123 | Single | 1 | 3 | f
201 | Single | 2 | 1 |
202 | Single | 2 | 1 | f
203 | Single | 2 | 1 | f
211 | Single | 2 | 2 | f
212 | Single | 2 | 2 | f
213 | Single | 2 | 2 | t
221 | Single | 2 | 3 | f
222 | Single | 2 | 3 | f
223 | Single | 2 | 3 | f
301 | Single | 3 | 1 | f
302 | Single | 3 | 1 | t
303 | Single | 3 | 1 | f
311 | Single | 3 | 2 | f
312 | Single | 3 | 2 | f
313 | Single | 3 | 2 | f
321 | Single | 3 | 3 | t
322 | Single | 3 | 3 | f
323 | Single | 3 | 3 | f
401 | Single | 4 | 1 | f
402 | Single | 4 | 1 | t
403 | Single | 4 | 1 | f
411 | Single | 4 | 2 | f
412 | Single | 4 | 2 | f
413 | Single | 4 | 2 | f
421 | Single | 4 | 3 | t
422 | Single | 4 | 3 | f
423 | Single | 4 | 3 | f
Answer:
7
SELECT count(*) "Number of available rooms"
FROM room
WHERE unavailable='t'
LeetCode Question & Answer
Rotate List
Description:
Given a list, rotate the list to the right by k places, where k is non-negative.
Input: 1->2->3->4->5->NULL k=2
Output: 4->5->1->2->3->NULL
Tips:
注意所有corner case
Code:

时间复杂度:O(n)
空间复杂度:O(1)
往期精彩回顾
想快速学习数据科学?技巧经验都在这儿!
如何准备Front-End Back-End岗位面试?
2021年数据工程师,你最需要这10个技能!
详解netflix推荐系统
数据岗位大合集|DS、DA、BA和DE的区别及求职面试重点




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



![[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)
相关资源