百度大模型研发日常实习
一面
c++ 完全忘光外加 paddle框架完全不懂 疯狂被拷打
自我介绍(5分钟)
c++:指针和引用的区别
new delete/malloc free 的区别是啥
c11里面智能指针了解吗
paddle 的架构了解吗
算子是什么 paddle算子 从顶层到底层执行的过程是怎样的?
算法题: 找出给定字符串中没有重复字符的最长子串的长度
二面
自我介绍(5分钟)
组里是什么方向?简单问了问项目(5分钟)
算法题:最大子数组和问题
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int maxSubArray(vector<int>& nums) {
int currentSum = nums[0];
int maxSum = nums[0];
for (int i = 1; i < nums.size(); i++) {
// 如果当前和加上 nums[i] 还不如 nums[i] 本身大,就重新开始
currentSum = max(nums[i], currentSum + nums[i]);
maxSum = max(maxSum, currentSum);
}
return maxSum;
}
int main() {
vector<int> nums = {-2, 1, -3, 4, -1, 2, 1, -5, 4};
cout << "最大子数组和为:" << maxSubArray(nums) << endl;
return 0;
}

美团工作强度 2569人发布
查看26道真题和解析