查看原文
其他

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

2017-12-21 数据应用学院 大数据应用

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

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


Day 159

DS Interview Questions

How do you understand the term Normal Distribution?

BA Interview Questions

What are the key tasks a Business Analyst would perform within your organization?

Leetcode Questions

Description:

Given two binary strings, return their sum (also a binary string).

Input: a = “11” b = “1”

Output: “100"

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

Day 158 答案揭晓

DS Interview Questions

What is the Central Limit Theorem? Explain it. Why is it important?

The CLT states that the arithmetic mean of a sufficiently large number of iterates of independent random variables will be approximately normally distributed regardless of the underlying distribution. i.e: the sampling distribution of the sample mean is normally distributed.

- Used in hypothesis testing

- Used for confidence intervals

- Random variables must be iid: independent and identically distributed

- Finite variance


BA Interview Questions

How would you convince management that a business analyst is needed within a team?

Answering a few key questions and summarizing the results can help you objectively present to management the need for a business analyst.

  • What are the key tasks a Business Analyst would perform within your organization?

  • How well is the team performing on each business analysis task?

  • How much time/money is lost due to poorly performed Business Analysis tasks?

  • Which tasks could the existing team improve on and which should be completed by an experienced business analyst?

  • Perform a summary level cost-benefit analysis based on your findings

Leetcode Questions

  • Description:

    • The set [1,2,3,…,n] contains a total of n! unique permutations.

    • By listing and labeling all of the permutations in order,

    • We get the following sequence (ie, for n = 3):

  •  "123"

  •  "132"

  •  "213"

  •  "231"

  •  "312"

  •  "321"

    • Given n and k, return the kth permutation sequence.

  • Input: 3, 2

  • Output: 132

  • Assumptions:

    • Given n will be between 1 and 9 inclusive.


  • Solution:

    • 暴力的解法是使用DFS遍历并计数,时间复杂度过高

    • 遇到permutation的题第一件事先把图画出来

    • 可以找到规律,每一层节点为根的树有m!个叉,根据这个可以判断每层分别是哪个数

  • Code:


  • Time Complexity: O(n ^ 2)

  • Space Complexity: O(n)








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





100 29909 100 29909 0 0 8094 0 0:00:03 0:00:03 --:--:-- 8120 * Connection #0 to host 37.48.118.90 left intact

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

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