实习薪资
近期有不少同学咨询互联网大厂的实习薪资水平。近年来,校招薪资透明度有所下降,不同公司、岗位方向差异明显。
常规技术岗与AI相关实习岗薪资差距显著,部分热门方向如AI研发,实习日薪可达普通岗位近两倍。此外,同一企业内部不同业务线或研究方向的待遇也存在较大差异。例如,有消息称字节跳动部分实习生日薪高达1500元,甚至超过部分正式员工收入。
以下为综合整理的主流互联网企业实习薪资参考表(数据仅供参考,实际以官方为准):
字节跳动:300~400元/天,特定组别优秀者上不封顶
拼多多:400~500元/天
阿里巴巴:本科350~400元/天,硕士400~500元/天
猿辅导:800元/天
快手:400元/天
美团:本科280元/天,硕士300元/天
百度:200~300元/天
哔哩哔哩:本科300元/天,硕士350元/天
腾讯:7500元/月
京东:8000~11000元/月
网易:本科5000元/月,硕士6000元/月
小米:6500元/月
题目描述
平台:LeetCode
题号:502
假设力扣(LeetCode)即将启动IPO,需在前期完成最多k个项目以提升资本总额。每个项目i具有纯利润profits[i]和启动所需最小资本capital[i]。初始资本为w,完成项目后利润将加入总资本。
目标是从n个项目中选择至多k个,使最终资本最大化,并返回最大可获得资本。
示例1:
输入:k = 2, w = 0, profits = [1,2,3], capital = [0,1,1]
输出:4
解释:
初始资本为0,只能从0号项目开始,完成后资本变为1;
随后可选择1号或2号项目,优先选择利润更高的2号项目(利润3);
最终资本为0 + 1 + 3 = 4。
示例2:
输入:k = 3, w = 0, profits = [1,2,3], capital = [0,1,2]
输出:6
解题思路:贪心 + 优先队列(堆)
每完成一个项目,总资本w只增不减,因此后续可解锁更多高门槛项目。最优策略是:在所有当前资金能启动的未选项目中,优先选择利润最大的。
该策略可通过归纳法证明其最优性:
- 若某次选择非最大利润项目cur,而最大利润为max(max ≥ cur),将其替换为max不会导致结果变差;
- 替换后总资本不会减少,后续可选项目集合不变或扩大,整体收益不会降低。
算法流程如下:
- 将项目按启动资本升序排序;
- 使用大根堆维护当前可执行项目的利润,每次取出堆顶(最大利润)执行;
- 更新资本后,将新解锁的项目加入堆中;
- 重复直至完成k个项目或无法继续执行。
Java代码实现
class Solution {
public int findMaximizedCapital(int k, int w, int[] profits, int[] capital) {
int n = profits.length;
List<int[]> list = new ArrayList<>();
for (int i = 0; i < n; i++) {
list.add(new int[]{capital[i], profits[i]});
}
Collections.sort(list, (a,b)->a[0]-b[0]);
PriorityQueue<Integer> q = new PriorityQueue<>((a,b)->b-a);
int i = 0;
while (k-- > 0) {
while (i < n && list.get(i)[0] <= w) q.add(list.get(i++)[1]);
if (q.isEmpty()) break;
w += q.poll();
}
return w;
}
}
C++代码实现
class Solution {
public:
int findMaximizedCapital(int k, int w, vector<int>& profits, vector<int>& capital) {
int n = profits.size();
vector<pair<int, int>> projects;
for (int i = 0; i < n; i++) {
projects.push_back({capital[i], profits[i]});
}
sort(projects.begin(), projects.end(), [](const pair<int, int>& a, const pair<int, int>& b) {
return a.first < b.first;
});
priority_queue<int> q;
int i = 0;
while (k-- > 0) {
while (i < n && projects[i].first <= w) q.push(projects[i++].second);
if (q.empty()) break;
w += q.top();
q.pop();
}
return w;
}
};
Python代码实现
class Solution:
def findMaximizedCapital(self, k: int, w: int, profits: List[int], capital: List[int]) -> int:
n = len(profits)
projects = [(c, p) for c, p in zip(capital, profits)]
projects.sort(key=lambda x: x[0])
max_heap = []
i = 0
for _ in range(k):
while i < n and projects[i][0] <= w:
heapq.heappush(max_heap, -projects[i][1])
i += 1
if not max_heap:
break
w += -heapq.heappop(max_heap)
return w
- 时间复杂度:O(n log n),主要开销在于排序与堆操作;
- 空间复杂度:O(n),用于存储项目列表和优先队列。

