0706 投递 大疆 数字化产品经理 base 深圳
0706 投递 格力 用户研究 base 珠海
- 0706做了测评
0702 投递 荣耀-解决方案测试工程师
0702 投递 OPPO 数据分析和软件测试工程师
0627 投递 shein 数据挖掘工程师 深圳
- 0707 笔试 一个小时 :::info 请编写一个方法,返回某集合的所有非空子集。 给定一个int数组A和数组的大小int n,请返回A的所有非空子集。保证A的元素个数小于等于20,且元素互异。各子集内部从大到小排序,子集之间字典逆序排序,见样例。 :::
:::info 在python中最多两次买卖股票后找到最大利润的程序 :::
买卖股票
class Solution:
def maxProfit(self , prices):
# write code here
first_buy = first_sell = float("-inf")
second_buy = second_sell = float("-inf")
for i in prices:
first_buy = max(first_buy,-i)
first_sell = max(first_sell,first_buy+i)
second_buy = max(second_buy,first_sell-i)
second_sell = max(second_sell,second_buy+i)
return max(0,first_sell,second_sell)
# 返回非空子集 。
# -*- coding:utf-8 -*-
class Subset:
# 返回二维[[],[],[]]
def getSubsets(self, A, n):
# write code here
A.sort(reverse=True)
allset = 2**n
res = []
for i in range(allset):
item = []
for j in range(n):
if i&(2**j):
item.append(A[j])
res.append(item)
res.sort(reverse=True)
return res[:-1]
0624 投递 中兴 - 战略规划师 -南京 0701 测评
蔚来 一志愿:数据产品分析师 二志愿:大数据开发工程师 -上海
一志愿:0705挂
0623 投递 用友 - 数据分析 -北京
0621 投递 大华-数据挖掘工程师- 杭州
- 0627给了笔试,挺难的 c++ 和深度学习的考察比较多。