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

大数据 1293 Views

点击上方蓝字 会变美

Nov.

20

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

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

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

Day

389

DS Interview Question

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

BA Interview Question

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

LeetCode Question

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

Day

388

答案揭晓

DS Interview Question & Answer

Describe what is the Artificial Neural Network?

Answer:

 

An Artificial Neural Network (ANN) is a computational model. It is based on the structure and functions of biological neural networks. It works like the way human brain processes information. It includes a large number of connected processing units that work together to process information, which can generate meaningful results from it.

BA Interview Question & Answer

Write a query in SQL to obtain the names of all the nurses who have ever been on call for room 122.

Answer:

SELECT n.name

   FROM nurse n

   WHERE employeeid IN

 (SELECT oc.nurse FROM on_call oc, room r

  WHERE oc.blockfloor = r.blockfloor

  AND oc.blockcode = r.blockcode

  AND r.roomnumber = 122 );

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

LeetCode Question & Answer

Remove Duplicates from Sorted Array II

Description:

Follow up for “Romove Duplicates”

What if duplicates are allowed at most twice?

Input: [1,1,2,2,2,3,3,3]

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

Tips:

保留最多两个重复元素,实现方法不止一种,但是要考虑到改变了数组中的值是否会对后续判断产生影响

Code: 

时间复杂度:O(n)

空间复杂度:O(1)


往期精彩回顾

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

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

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

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

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


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

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