首页
题库
公司真题
专项练习
面试题库
在线编程
面试
面试经验
AI 模拟面试
简历
求职
学习
基础学习课
实战项目课
求职辅导课
专栏&文章
竞赛
我要招人
发布职位
发布职位、邀约牛人
更多企业解决方案
AI面试、笔试、校招、雇品
HR免费试用AI面试
最新面试提效必备
登录
/
注册
_Herc
联发科技_嵌入式
获赞
26
粉丝
13
关注
14
看过 TA
141
男
广东工业大学
2024
嵌入式工程师
IP属地:广东
暂未填写个人简介
私信
关注
拉黑
举报
举报
确定要拉黑_Herc吗?
发布(120)
评论
刷题
收藏
_Herc
关注TA,不错过内容更新
关注
2022-11-19 21:30
已编辑
联发科技_嵌入式
题解 | #最长无重复子数组#
C语言int maxLength(int* arr, int arrLen ) { // write code here int* hash = (int*)calloc(100001, sizeof(int)); memset(hash, 0, sizeof(int)*100001); // int hash[9] = {0}; //本地测试使用 int left = 0, right = 1; //左右索引 int maxLen = 1; //最大长度,初始为1,即左索引 hash[arr[left]] = 1; //初始左索引已使用 while(right < arrLen){ /...
0
点赞
评论
收藏
分享
2022-11-19 20:18
已编辑
联发科技_嵌入式
题解 | #三数之和#
C语言//从小排到大 void sort(int *num, int numLen){ int temp; for(int i=0; i<numLen; i++){ for(int j=i; j<numLen; j++){ if(num[j] < num[i]){ temp = num[i]; num[i] = num[j]; num[j] = temp; } } } } int** threeSum(int* num, int numLen, int* returnSize, int** returnColumnSizes ) { // write code here in...
0
点赞
评论
收藏
分享
2022-11-19 17:32
联发科技_嵌入式
题解 | #缺失的第一个正整数#
C语言 /** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * * @param nums int整型一维数组 * @param numsLen int nums数组长度 * @return int整型 */ int minNumberDisappeared(int* nums, int numsLen ) { // write code here int* hash = (int*)calloc(500001, sizeof(int)); memset(hash, 0, 500001*sizeof(int)); for(int i=0; i<num...
0
点赞
评论
收藏
分享
2022-11-19 17:12
已编辑
联发科技_嵌入式
题解 | #数组中只出现一次的两个数字#
c语言,两种解法/** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * * @param array int整型一维数组 * @param arrayLen int array数组长度 * @return int整型一维数组 * @return int* returnSize 返回数组行数 */ //这里两种写法都空间复杂度不为1,因为C语言不带哈希表 //法1:用数组做哈希表,判断出现一次的数 int* FindNumsAppearOnce1(int* array, int arrayLen, int* returnSize ) { // write c...
0
点赞
评论
收藏
分享
2022-11-18 20:10
联发科技_嵌入式
题解 | #单链表的排序#
C语言/** * * @param head ListNode类 the head node * @return ListNode类 */ //返回当前链表最小值的索引 int findListMinElem(struct ListNode* head){ int retMinIndex = 0, curIndex = 0; struct ListNode* tmpList = head; int minElem = tmpList->val; while(tmpList){ if(tmpList->val < minElem){ minElem = tmpList->...
0
点赞
评论
收藏
分享
2022-11-17 13:18
联发科技_嵌入式
2022-11-17
在牛客打卡27天,今天学习:刷题 33 道/代码提交 11 次
每日监督打卡
0
点赞
评论
收藏
分享
2022-11-17 13:11
已编辑
联发科技_嵌入式
题解 | #合并k个已排序的链表#
C语言//根据索引获得链表的元素 int getListElemByIndex(struct ListNode* list, int index){ for(int i=0; i<index; i++) list = list->next; return list->val; } //计算数组指定长度的前N项和 int getSumLen(int *eachLen, int listsLen){ int sumLen = 0; for(int i=0; i<listsLen; i++){ sumLen += eachLen[i]; } return sumLen; } ...
0
点赞
评论
收藏
分享
2022-11-16 15:57
联发科技_嵌入式
2022-11-16
在牛客打卡26天,今天学习:刷题 41 道/代码提交 9 次
每日监督打卡
0
点赞
评论
收藏
分享
2022-11-16 10:34
已编辑
联发科技_嵌入式
题解 | #判断是不是二叉搜索树#
C语言//参考思路:把二叉树按照前序遍历把节点值压入栈,根据栈是否单调递增判断void recursion(struct TreeNode* node, int *stack, int *st_i){ if(node == NULL)return; recursion(node->left, stack, st_i); //前序遍历,把节点值压入栈 stack[(*st_i)++] = node->val; recursion(node->right, stack, st_...
0
点赞
评论
收藏
分享
2022-11-15 14:26
联发科技_嵌入式
2022-11-15
在牛客打卡25天,今天学习:刷题 31 道/代码提交 1 次
每日监督打卡
0
点赞
评论
收藏
分享
2022-11-14 12:56
联发科技_嵌入式
2022-11-14
在牛客打卡24天,今天学习:刷题 32 道/代码提交 10 次
每日监督打卡
0
点赞
评论
收藏
分享
2022-11-14 09:54
已编辑
联发科技_嵌入式
题解 | #二叉树中和为某一值的路径(一)#
C语言, 递归bool recursion(struct TreeNode* node, int target){ static int sum = 0; int lastNode; if(!node)return false; //根节点为空 sum += node->val; //将当前节点的值加入sum // if(sum > target)return false; ...
0
点赞
评论
收藏
分享
2022-11-13 14:49
联发科技_嵌入式
2022-11-13
在牛客打卡23天,今天学习:刷题 54 道/代码提交 15 次
每日监督打卡
0
点赞
评论
收藏
分享
2022-11-13 13:35
已编辑
联发科技_嵌入式
题解 | #二叉树的最大深度#
C语言void recursion(struct TreeNode* node, int *maxDepth){ static int tmpDepth = 1; //初始化当前深度为1,根节点 if(*maxDepth < tmpDepth) *maxDepth = tmpDepth; //如果当前深度大于最大深度,则更新最大深度 if(!node->left && !node->right){ &nb...
0
点赞
评论
收藏
分享
2022-11-13 11:15
联发科技_嵌入式
题解 | #二叉树的镜像#
C语言void recursion(struct TreeNode* node){ struct TreeNode* tmpNode; if(!node) return; tmpNode = node->left; node->left = node->right; node->right = tmpNode; if(node->left)recursion(node->left); &nbs...
0
点赞
评论
收藏
分享
1
3
4
5
6
7
8
创作者周榜
更多
关注他的用户也关注了:
牛客网
牛客企业服务