随笔分类 -  数据结构与算法

牛客与力扣的刷题记录
摘要:给你二叉树的根节点 `root` ,返回其节点值的 **层序遍历** 阅读全文
posted @ 2024-12-05 15:58 dwhere 阅读(7) 评论(0) 推荐(0) 编辑
摘要:请你将两个数相加,并以相同形式返回一个表示和的链表。 阅读全文
posted @ 2024-11-27 16:16 dwhere 阅读(4) 评论(0) 推荐(0) 编辑
摘要:合并两个有序链表 阅读全文
posted @ 2024-11-27 15:44 dwhere 阅读(27) 评论(0) 推荐(0) 编辑
摘要:判断该链表是否为回文链表 阅读全文
posted @ 2024-11-26 17:32 dwhere 阅读(14) 评论(0) 推荐(0) 编辑
摘要:两两交换链表中的节点 阅读全文
posted @ 2024-11-25 21:10 dwhere 阅读(3) 评论(0) 推荐(0) 编辑
摘要:删除链表的倒数第 N 个结点 阅读全文
posted @ 2024-11-25 17:49 dwhere 阅读(5) 评论(0) 推荐(0) 编辑
摘要:给定一个未排序的整数数组 nums ,找出数字连续的最长序列(不要求序列元素在原数组中连续)的长度。 阅读全文
posted @ 2024-11-09 16:15 dwhere 阅读(21) 评论(0) 推荐(1) 编辑
摘要:给你单链表的头节点 head ,请你反转链表,并返回反转后的链表。 阅读全文
posted @ 2024-11-08 10:13 dwhere 阅读(7) 评论(0) 推荐(0) 编辑
摘要:编写一个算法来判断一个数 n 是不是快乐数。 阅读全文
posted @ 2024-11-06 16:25 dwhere 阅读(16) 评论(0) 推荐(0) 编辑
摘要:给定两个数组 nums1 和 nums2 ,返回它们的交集。 阅读全文
posted @ 2024-11-06 14:26 dwhere 阅读(8) 评论(0) 推荐(0) 编辑
摘要:定义栈的数据结构,请在该类型中实现一个能够得到栈中所含最小元素的 min 函数 阅读全文
posted @ 2024-11-04 17:53 dwhere 阅读(3) 评论(0) 推荐(0) 编辑
摘要:某个元素只出现一次以外,其余每个元素均出现两次。找出那个只出现了一次的元素。 阅读全文
posted @ 2024-11-03 21:38 dwhere 阅读(4) 评论(0) 推荐(0) 编辑
摘要:返回滑动窗口中的最大值 阅读全文
posted @ 2024-11-02 17:21 dwhere 阅读(8) 评论(0) 推荐(0) 编辑
摘要:逆波兰表达式求值 (后缀表达式计算) 阅读全文
posted @ 2024-11-01 23:03 dwhere 阅读(3) 评论(0) 推荐(0) 编辑
摘要:给出由小写字母组成的字符串 s,重复项删除操作会选择两个相邻且相同的字母,并删除它们。 阅读全文
posted @ 2024-11-01 21:47 dwhere 阅读(7) 评论(0) 推荐(0) 编辑
摘要:有效的括号(括号匹配) 阅读全文
posted @ 2024-11-01 16:48 dwhere 阅读(6) 评论(0) 推荐(0) 编辑
摘要:请你仅使用队列实现一个后入先出(LIFO)的栈 阅读全文
posted @ 2024-11-01 15:20 dwhere 阅读(5) 评论(0) 推荐(0) 编辑
摘要:使用两个栈实现先入先出队列 阅读全文
posted @ 2024-11-01 11:31 dwhere 阅读(9) 评论(0) 推荐(0) 编辑
摘要:二叉树的递归遍历(前、中、后序) 阅读全文
posted @ 2024-10-31 21:11 dwhere 阅读(19) 评论(0) 推荐(0) 编辑
摘要:两个链表的第一个公共结点(相交链表) 阅读全文
posted @ 2024-10-31 19:37 dwhere 阅读(14) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示