02 2025 档案

内存管理-10-内存相关栈回溯
摘要:1. 缺页异常的栈 rt_spin_lock wake_up_page_bit unlock_page filemap_map_pages handle_mm_fault do_page_fault do_translation_fault do_mem_abort el0_ia el0_sync_ 阅读全文

posted @ 2025-02-19 11:29 Hello-World3 阅读(2) 评论(0) 推荐(0) 编辑

LeetCode-452. 用最少数量的箭引爆气球
摘要:一、C实现 1. 简介 参考: https://blog.csdn.net/zhizhengguan/article/details/124852708 先排序,然后再使用贪心算法,贪最大右边界。 2. C实现 #include <stdio.h> #define ARRAY_SIZE(arr) ( 阅读全文

posted @ 2025-02-18 16:57 Hello-World3 阅读(0) 评论(0) 推荐(0) 编辑

LeetCode-121. 买卖股票的最佳时机(121-I, 122-II, 123-III)
摘要:一、121. 买卖股票的最佳时机 1. 简介 参考: https://blog.csdn.net/qq_43498345/article/details/128308298 这个是只允许买卖一次。可以使用贪心算法。 2. 代码实现 #include <stdio.h> #define INT_MAX 阅读全文

posted @ 2025-02-18 01:16 Hello-World3 阅读(5) 评论(0) 推荐(0) 编辑

LeetCode-59. 螺旋矩阵
摘要:一、C实现 1. 参考https://www.acoier.com/2021/03/15/54.%20%E8%9E%BA%E6%97%8B%E7%9F%A9%E9%98%B5%EF%BC%88%E4%B8%AD%E7%AD%89%EF%BC%89/注: 里面有多种解法 2. 递归实现 #includ 阅读全文

posted @ 2025-02-17 14:39 Hello-World3 阅读(1) 评论(0) 推荐(0) 编辑

LeetCode-36.有效的数独
摘要:一、C实现 1. 参考:https://juejin.cn/post/6893520419253714951 2. 实现 #include <stdio.h> /* 验证二维数组的打印 */ void arr_process(int (*arr)[3], int sz) { int i, j; fo 阅读全文

posted @ 2025-02-16 21:31 Hello-World3 阅读(0) 评论(0) 推荐(0) 编辑

LeetCode-209. 长度最小的子数组
摘要:一、C实现 1. 参考:https://cloud.tencent.com/developer/article/2296482 //通过滑动窗口解决 2. 实现代码 #include <stdio.h> #include <stdlib.h> #define INT_MAX ((int)(~0U > 阅读全文

posted @ 2025-02-16 18:32 Hello-World3 阅读(1) 评论(0) 推荐(0) 编辑

LeetCode-134.加油站
摘要:一、C实现 1. 参考:https://zhuanlan.zhihu.com/p/299991342 2. C实现 #include <stdio.h> #include <stdlib.h> #define ARRAY_SIZE(arr) (sizeof(arr)/sizeof(arr[0])) 阅读全文

posted @ 2025-02-16 16:35 Hello-World3 阅读(0) 评论(0) 推荐(0) 编辑

LeetCode-11.装最多水的容器
摘要:一、C实现 1. 参考:https://www.jb51.net/article/217205.htm 2. 代码 #include <stdio.h> #include <stdlib.h> #define ARRAY_SIZE(arr) (sizeof(arr)/sizeof(arr[0])) 阅读全文

posted @ 2025-02-16 15:33 Hello-World3 阅读(0) 评论(0) 推荐(0) 编辑

LeetCode-26.有序数组中去除重复项(26-I, 80-II)
摘要:一、LeetCode-26.有序数组中去除重复项 1. 参考: https://www.jb51.net/article/217344.htm 2. 实现 #include <stdio.h> #include <stdlib.h> #define ARRAY_SIZE(arr) (sizeof(a 阅读全文

posted @ 2025-02-16 14:24 Hello-World3 阅读(0) 评论(0) 推荐(0) 编辑

LeetCode-55.跳跃游戏(55-I, 45-II)
摘要:一、LeetCode-55.跳跃游戏 1. 参考:https://www.jb51.net/article/217248.htm 2. 代码实现 #include <stdio.h> #include <stdlib.h> #define ARRAY_SIZE(arr) (sizeof(arr)/s 阅读全文

posted @ 2025-02-16 10:56 Hello-World3 阅读(1) 评论(0) 推荐(0) 编辑

LeetCode-85.连续矩形面积
摘要:一、C实现 1. 参考 https://www.cnblogs.com/GarrettWale/p/15800968.html 2. 实现代码 #include <stdio.h> #include <string.h> #define ARRAY_SIZE(arr) (sizeof(arr)/si 阅读全文

posted @ 2025-02-15 20:59 Hello-World3 阅读(0) 评论(0) 推荐(0) 编辑

LeetCode-84.直方图中最大的矩形
摘要:一、C实现 1. 参考:https://www.jb51.net/article/217227.htm 2. 实现代码 #include <stdio.h> #include <string.h> #define ARRAY_SIZE(arr) (sizeof(arr)/sizeof(arr[0]) 阅读全文

posted @ 2025-02-14 20:36 Hello-World3 阅读(0) 评论(0) 推荐(0) 编辑

LeetCode-12.整数转化成罗马数字 & LeetCode-13.罗马数字转化成整数
摘要:一、整数转化成罗马数字 1. 参考: https://www.jb51.net/article/217252.htm 2. C实现 #include <stdio.h> #include <stdlib.h> #include <ctype.h> #define ARRAY_SIZE(arr) (s 阅读全文

posted @ 2025-02-14 14:59 Hello-World3 阅读(0) 评论(0) 推荐(0) 编辑

LeetCode-42.收集雨水
摘要:一、题目描述 计算最大能接雨水量。 对应Example: Input: [0,1,0,2,1,0,1,3,2,1,2,1]Output: 6 二、实现C代码 1. 解法1 通过动态规划思想,选求出下标i位置最左侧的最大高度,然后求出下标i位置最右侧最大高度,两个高度求较小值,此较小值与此位置的高度差 阅读全文

posted @ 2025-02-13 21:48 Hello-World3 阅读(1) 评论(0) 推荐(0) 编辑

导航

< 2025年2月 >
26 27 28 29 30 31 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 1
2 3 4 5 6 7 8
点击右上角即可分享
微信分享提示