每日一练 | Data Scientist & Business Analyst & Leetcode 面试题 492

大数据 2778 Views

点击上方蓝字 会变美

Nov.

23

Data Application Lab 自2017年6月15日起,每天和你分享讨论一道数据科学(DS)和商业分析(BA)领域常见的面试问题。

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

希望积极寻求相关领域工作的你每天关注我们的问题并且与我们一起思考,我们将会在第二天给出答案。

Day

391

DS Interview Question

What is the difference between Cluster and Systematic Sampling?

BA Interview Question

Write a query in SQL to Obtain the names of all patients who had at least two appointment where the nurse who prepped the appointment was a registered nurse and the physician who has carried out primary care.

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.

Day

390

答案揭晓

DS Interview Question & Answer

What are the advantages of ReLU over sigmoid function?

Answer:

 

Sigmoid function has the problem of vanish gradient because the gradient of sigmoid becomes increasingly small as the absolute value of x increases. But ReLU can reduce the likelihood of the gradient to vanish and the constant gradient of ReLU when  x>0 will result in faster learning.

Another advantage of ReLU is sparsity, which arises when x <=0.  The more such units that exist in a layer the more sparse the resulting representation.

BA Interview Question & Answer

Write a query in SQL to obtain the names of all patients who has been undergone a procedure costing more than $5,000 and the name of that physician who has carried out primary care.

Answer:

SELECT pt.name AS “Patient”,               p.name AS “Primary Physician”,               pd.cost AS “Procedure Cost”FROM patient ptJOIN undergoes u ON u.patient=pt.ssnJOIN physician p ON pt.pcp=p.employeeidJOIN PROCEDURE pd ON u.procedure=pd.codeWHERE pd.cost>5000;

Output:

 Patient         | Primary Physician  | Procedure Cost——————+————————–+—————- John Smith   | John Dorian            |     5600 Dennis Doe  | Christopher Turk     |    10000

https://www.w3resource.com/sql-exercises/hospital-database-exercise/sql-exercise-hospital-database-37.php

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(m+n)

空间复杂度:O(1)


往期精彩回顾

玩转数据可视化不可不看的10个Blog

赶在双卡双待iPhoneX发布前,谷歌悄默默搞了个大动作。

兄dei,你想做数据分析?那你不仅要有想象力还得有创造力。

如何打造不被HR忽略的完美简历,一篇值得你拿出简历认真研读的高能干货

在面试官问你,“Any Questions for Us?”的时候,这10个问题可以助你锁定offer!


点击 “阅读原文” 报名我们的课程吧😀!

如未说明则本站原创,转载请注明出处:NULL » 每日一练 | Data Scientist & Business Analyst & Leetcode 面试题 492