专栏名称: 大数据应用
数据应用学院被评为2016北美Top Data Camp, 是最专业一站式数据科学咨询服务机构,你的数据科学求职咨询专家!
目录
相关文章推荐
CDA数据分析师  ·  Deepseek教我自学Python,貌似3 ... ·  2 天前  
软件定义世界(SDX)  ·  指标数据体系建设分享 ·  3 天前  
大数据文摘  ·  为什么中国只有一个 DeepSeek? ·  4 天前  
CDA数据分析师  ·  2025 CDA数据分析师就业班课程更新通知 ·  3 天前  
51好读  ›  专栏  ›  大数据应用

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

大数据应用  · 公众号  · 大数据  · 2018-03-13 09:46

正文

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

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

Day 211

DS Interview Questions

Explain what resampling methods are and why they are useful.

BA Interview Questions

R language:

Write a nested loop, where the outer for() loop increments “a” 3 times, and the inner for() loop increments “b” 3 times.

The break statement exits the inner for() loop after 2 incrementations.

The nested loop prints the values of variables, “a” and “b“.

**The break statement is used within loops to exit from the loop.

If the break statement is within a nested loop, the inner loop is exited, and the outer loop is resumed.

LeetCode Questions

Description:
Write a function to find the longest common prefix string amongst an array of strings.
Input:[“aasdfgas”, “aaasafda”]
Output:“aa”

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

Day 210 答案揭晓

DS Interview Questions

What is cross-validation? How to do it right?

Cross Validation is generally used to assess the error of given models and select the most appropriate model.

Steps:

  1. Divide the sample data into training set and test set;

  2. Partition the training data into k equal-sized folds;

  3. For k = 1,2,...,K, fit the model to the other K-1 folds and calculate the prediction error on the k-th component.

  4. Take the average of the prediction errors as an estimate of model performance; select the model that results in the lowest average prediction error;

  5. Train the selected model on the entire training data and test on the held-out test set.  The prediction error is an estimate of the model’s performance in the real world.

BA Interview Questions

R language:

Using i


i

while(i<5){

print(i)

if(i==3) break;

i=i+1

}


Leetcode Questions

  • Description:

  • The count-and-say sequence is the sequence of integers with the first five terms asfollowing:

  • 1 is read off as “one 1” or 11.

  • 11 is read off as “two 1s” or 21.

  • 21 is read off as “one 2, then one 1” or 1211.

  • Given an integer n, generate the nth term of the count-and-say sequence.

  • Note: Each term of the sequence of integers will be represented as a string.

  • Input: 4

  • Output: “1211”







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