avatar
Articles
43
Tags
19
Categories
3
首页
时间轴
标签
分类
清单
  • 音乐
  • 照片
  • 电影
argcxiang's blog
首页
时间轴
标签
分类
清单
  • 音乐
  • 照片
  • 电影

argcxiang's blog

HOT100-2-二叉树最近公共祖先
Created2025-01-22|HOT100
题目描述给定一个二叉树, 找到该树中两个指定节点的最近公共祖先。 百度百科中最近公共祖先的定义为:“对于有根树 T 的两个节点 p、q,最近公共祖先表示为一个节点 x,满足 x 是 p、q 的祖先且 x 的深度尽可能大(一个节点也可以是它自己的祖先)。” 示例 1: 123输入:root = [3,5,1,6,2,0,8,null,null,7,4], p = 5, q = 1输出:3解释:节点 5 和节点 1 的最近公共祖先是节点 3 。 具体见题目链接。 算法思路​ ...
HOT100-1-相交链表
Created2025-01-22|HOT100
题目描述给你两个单链表的头节点 headA 和 headB ,请你找出并返回两个单链表相交的起始节点。如果两个链表不存在相交节点,返回 null 。 图示两个链表在节点 c1 开始相交 : 如图所示,则输出C1;具体见题目链接:题目链接 题目思路这道题目我是不会的……我只能想到暴力破解,就是通过两层循环进行遍历,找到最开始的地址相同的节点,伪代码差不多是这样:: 1234567891011tmpA = headA;while(tmpA != NULL) { tmpB = headB; while (tmpB != NULL) { if (tmpA != tmpB) { return tmpA; } tmpB = tmpB->next; }} return NULL; ​ ...
argcxiang's first blog
Created2025-01-21|selfintroduce
Hello, there is argcxiang, I am testing my blog on GitHub! I come from Wuhan University, majoring in Information Security, and I am interesting with some technology skills. The reason why I created this Blog is to record some experience in coding exercise, which is for next year’s summer camp, I hope all we can enter to our dream school. Thanks!
1…45
avatar
argcxiang
I am a student, majoring in information security.
Articles
43
Tags
19
Categories
3
Follow Me
Announcement
祝你今天开心!
Recent Posts
IVW150-4-轮转数组2025-05-22
ChatBox+siliconFlow,你的AI助手!2025-05-21
IVW150-3-删除有序数组中的重复项2025-05-20
IVW150-2-移除元素2025-05-17
IVW150-1-合并两个有序数组2025-05-16
Categories
  • HOT10035
  • IVW1504
  • selfintroduce1
Tags
动态规划 前缀和 快速选择 二分查找 哈希表 BFS 拓扑 贪心 分治 递减栈 双指针 循环链表 栈 桶排序 回溯 DFS 快慢指针 链表 反转链表
Archives
  • May 2025 10
  • April 2025 4
  • March 2025 9
  • February 2025 9
  • January 2025 11
Website Info
Article Count :
43
Unique Visitors :
Page Views :
Last Update :
©2019 - 2025 By argcxiang
Framework Hexo|Theme Butterfly