查看原文
其他

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

2017-11-15 数据应用学院 大数据应用

从6月15日起,数据应用学院将与你一起温习数据科学(DS)和商业分析(BA)领域常见的面试问题。从10月4号起,每天再为大家分享一道Leetcode算法题。

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

Day 137

DS Interview Questions

How can you choose a classifier based on training set size?

BA Interview Questions

How many data structures does R language have?

Leetcode Questions

Description:

  • Merge k sorted linked lists and return it as one sorted list. Analyze and describe its complexity.

Input: [[1,2],[3,6],[4,5]];

Output:[1,2,3,4,5,6]


欲知答案如何?请见下期分解!

Day 136 答案揭晓

DS Interview Questions

What are the advantages and disadvantages of neural networks?

Advantages: Neural networks (specifically deep NNs) have led to performance breakthroughs for unstructured datasets such as images, audio, and video. Their incredible flexibility allows them to learn patterns that no other ML algorithm can learn.


Disadvantages: However, they require a large amount of training data to converge. It's also difficult to pick the right architecture, and the internal "hidden" layers are incomprehensible.

BA Interview Questions

How missing values and impossible values are represented in R language?

NaN (Not a Number) is used to represent impossible values whereas NA (Not Available) is used to represent missing values. The best way to answer this question would be to mention that deleting missing values is not a good idea because the probable cause for missing value could be some problem with data collection or programming or the query. It is good to find the root cause of the missing values and then take necessary steps handle them.

Leetcode Questions

Description:

  • Given n pairs of parentheses, write a function to generate all combinations of well-formed parentheses.

Input: 3

Output: ["((()))", “(()())”, “(())()”, “()(())”, “()()()”]

Solution:

排列题,用隐式图DFS遍历

String 是immutable类,不用特意回溯

剪枝: 当左边括号和右边括号数量相等时,可以省去加右边括号的搜索

Code:





点击“阅读原文”查看数据应用学院核心课程


您可能也对以下帖子感兴趣

文章有问题?点此查看未经处理的缓存