点击上方 蓝字 会变美
“
每
日
一
练
”
Jun.
14
Data Application Lab 自2017年6月15日起,每天和你分享讨论一道数据科学(DS)和商业分析(BA) 领域常见的面试问题。
自2017年10月4日起,每天再为大家分享一道Leetcode 算法题。
希望积极寻求相关领域工作的你每天关注我们的问题并且与我们一起思考,我们将会在第二天给出答案。
“
每
日
一
练
”
Day
1565
DS Interview Question
What is difference between Bayesian and Frequentist? ?
BA Interview Question
Write a query in SQL to find the name of the patients and the number of the room where they have to go for their treatment.

LeetCode Question
Valid Palindrome
Deion:
Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases.
Input: “A man, a plan, a canal: Panama”
Output: true
Day
1564
答案揭晓
DS Interview Question & Answer
How can you copy objects in Python?
The functions used to copy objects in Python are-
1) Copy.copy for shallow copy
2) Copy.deepcopy for deep copy
However, it is not possible to copy all objects in Python using these functions. For instance, dictionaries have a separate copy method whereas sequences in Python have to be copied by ‘Slicing’.
BA Interview Question & Answer
Write a query in SQL to count number of unique patients who got an appointment for examination room C

Answer:
SELECT count(DISTINCT patient) AS "No. of patients got appointment for room C"
FROM appointment
WHERE examinationroom='C';
LeetCode Question & Answer
Best Time to Buy and Sell Stock II
Deion:
Say you have an array for which the ith element is the price of a given stock on day i.
Design an algorithm to find the maximum profit. You may complete as many transactions as you like (ie, buy one and sell one share of the stock multiple times). However, you may not engage in multiple transactions at the same time (ie, you must sell the stock before you buy again).
Input: [1,2,3,1,6]
Output: 7
Solution:
这道题可以简化为找到所有的递增区间的总增长
Code:

Time Complexity: O(n)
Space Complexity: O(1)
Power BI vs Tableau:数据可视化工具选哪个?
我曾尝试84个ChatGPT插件,哪些值得推荐?
成为更好的数据分析师的5个习惯!
美国教育部分享对人工智能的见解和建议
优化SQL查询的10大技巧!
点「在看」的人都变好看了哦返回搜狐,查看更多