查看原文
其他

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

数据应用学院 大数据应用 2018-07-13

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


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


Day 230


DS Interview Questions

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


BA Interview Questions

Explain when you would use WHERE versus HAVING statements.


LeetCode Questions

    • Description:

      • Given a collection of numbers that might contain duplicates, return all possible unique permutations.

    • Input: [1,1,2]

    • Output: [[1,1,2],[1,2,1],[2,1,1]]


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



Day 229 答案揭晓


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

Which of the following is wrong? 

A.    All columns in a matrix must have the same data types and same length

B.     A data frame is more general than a matrix, in that different columns can have different modes

C.    A matrix is a collection of data element arrange in a two-dimensional data structure and a data frame is 3 dimensional data structure.

D.    A data frame is used for storing data tables. It is a list of vectors of equal length.

Answer: C. Both matrix and dataframe is 2 dimensional data structure.


LeetCode Questions

  • Description:

    • Given a collection of distinct numbers, return all possible permutations.

  • Input:[1,2,3]

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

Solution:

  • 与排列相比较,需要多一个Set来记录当前状态的值的索引

  • 回溯的时候注意不仅要回溯当前状态,也需要回溯Set的值

  • 因为是distinct numbers, 所以不需要去重


  • Code:




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

↓↓↓ 

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

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