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

大数据 733 Views

点击上方蓝字 会变美

Nov.

21

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

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

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

Day

390

DS Interview Question

What are the advantages of ReLU over sigmoid function?

BA Interview Question

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.

LeetCode Question

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

Day

389

答案揭晓

DS Interview Question & Answer

Describe the basic layer structure of ANN and what each part represent for.

Answer:

 

A neural network may contain the following 3 layers:1.Input layer – The activity of the input units represents the raw information that can feed into the network.2.Hidden layer – To determine the activity of each hidden unit. The activities of the input units and the weights on the connections between the input and the hidden units. There may be one or more hidden layers.3.Output layer – The behavior of the output units depends on the activity of the hidden units and the weights between the hidden and output units.

BA Interview Question & Answer

Write a query in SQL to Obtain the names of all patients who has been prescribed some medication by his/her physician who has carried out primary care and the name of that physician.

table: patient

ssn              |       name                 |      address               |  phone         | insuranceid | pcp—————-+————————–+—————————+—————–+—————-+—–100000001 | John Smith              | 42 Foobar Lane        | 555-0256   |    68476213 |   1100000002 | Grace Ritchie          | 37 Snafu Drive          | 555-0512   |    36546321 |   2100000003 | Random J. Patient  | 101 Omgbbq Street   | 555-1204   |    65465421 |   2100000004 | Dennis Doe            | 1100 Foobaz Avenue | 555-2048   |    68421879 |   3

 Answer:

SELECT pt.name AS “Patient”,      p.name AS “Physician”FROM patient ptJOIN prescribes pr ON pr.patient=pt.ssnJOIN physician p ON pt.pcp=p.employeeidWHERE pt.pcp=pr.physician AND pt.pcp=p.employeeid;

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

LeetCode Question & Answer

Merge Two Sorted Lists

Description:

Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists.

Input: 1->3->5->null 2->4->6->7->null

Output:1->2->3->4->5->6->7->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 面试题 490