专栏名称: 大数据应用
数据应用学院被评为2016北美Top Data Camp, 是最专业一站式数据科学咨询服务机构,你的数据科学求职咨询专家!
目录
相关文章推荐
艺恩数据  ·  春节档观众满意度亮眼 ... ·  1 周前  
艺恩数据  ·  新春贺岁,福满人间! ·  2 周前  
数据派THU  ·  【HKUST博士论文】单视图图像的高质量3D生成 ·  3 天前  
数据派THU  ·  机器学习过程:特征、模型、优化和评估 ·  3 天前  
大数据分析和人工智能  ·  这样做,DeepSeek输出增强100倍 ·  3 天前  
51好读  ›  专栏  ›  大数据应用

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

大数据应用  · 公众号  · 大数据  · 2019-10-23 09:03

正文

点击上方 蓝字 会变美




Oct.

22

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

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


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

Day

625

DS Interview Question

Tell me some majors issues needed to be considered in supervised machine learning?

BA Interview Question

Employees Earning More Than Their Managers


The Employee table holds all employees including their managers. Every employee has an Id, and there is also a column for the manager Id.

+----+---------+
| Id | Email   |
+----+---------+
| 1  | [email protected] |
| 2  | [email protected] |
| 3  | [email protected] |
+----+---------+


Given the Employee table, write a SQL query that finds out employees who earn more than their managers. For the above table, Joe is the only employee who earns more than his manager.

+---------+
| Email   |
+---------+
| [email protected] |
+---------+

LeetCode Question

Length of Last Word


Description:

Given a string s consists of upper/lower-case alphabets and empty space characters ’ ', return the length of last word in the string.

Input: s = “Hello World”

Output: 5

Assumptions:

If the last word does not exist, return 0.

Day

624

答案揭晓

DS Interview Question & Answer

How does a tree decide where to split?

The decision criteria is different for classification and regression trees.


Decision trees use multiple algorithms to decide to split a node in two or more sub-nodes. The creation of sub-nodes increases the homogeneity of resultant sub-nodes. Decision tree splits the nodes on all available variables and then selects the split which results in most homogeneous sub-nodes. Some most commonly used algorithms to split the node are: Gini Index, Chi-Square, Information Gain, Reduction in Variance.

BA Interview Question & Answer

Consecutive Numbers


Write a SQL query to find all numbers that appear at least three times consecutively.
+----+-----+
| Id | Num |
+----+-----+
| 1  |  1  |
| 2  |  1  |
| 3  |  1  |
| 4  |  2  |
| 5  |  1  |
| 6  |  2  |
| 7  |  2  |
+----+-----+


For example, given the above Logs table, 1 is the only number that appears consecutively for at least three times.

+-----------------+
| ConsecutiveNums |
+-----------------+
| 1               |
+-----------------+


Answer: Using DISTINCT and WHERE clause

Select DISTINCT l1.Num as ConsecutiveNums from Logs l1, Logs l2, Logs l3
where l1.Id=l2.Id-1 and l2.Id=l3.Id-1
and l1.Num=l2.Num and l2.Num=l3.Num


Reference:

https://leetcode.com/problems/consecutive-numbers/solution/







请到「今天看啥」查看全文