数据结构基础

题目

数学题 暴力 用别的不方便

leetcode42:接雨水 https://leetcode.cn/problems/trapping-rain-water/

链表

反转链表|offer24|0901

https://leetcode-cn.com/problems/fan-zhuan-lian-biao-lcof/submissions/

题解 :看图,记住初始设置,以及变化过程:https://leetcode-cn.com/problems/fan-zhuan-lian-biao-lcof/solution/fan-zhuan-lian-biao-yi-dong-de-shuang-zhi-zhen-jia/

删除倒数k个节点 双指针|offer19|0329

题解:https://leetcode-cn.com/problems/remove-nth-node-from-end-of-list/solution/dong-hua-tu-jie-leetcode-di-19-hao-wen-ti-shan-chu/

队列

滑动窗口

pre:调用【哈希集合】来判断是否有重复元素

Leetcode3
思路:遍历字符串,每一回合获得,当前、符合条件(无重复)的子串(用队列来表示);不断更新最大队列。
题解: https://leetcode-cn.com/problems/longest-substring-without-repeating-characters/solution/hua-dong-chuang-kou-by-powcai/.

单调队列

https://www.luogu.com.cn/problem/P1886

查找

二分

剑指offer 11
题解: https://leetcode-cn.com/problems/xuan-zhuan-shu-zu-de-zui-xiao-shu-zi-lcof/solution/xuan-zhuan-shu-zu-de-zui-xiao-shu-zi-by-leetcode-s/.

dfs

剑指offer 12 剪枝+回溯
题解: https://leetcode-cn.com/problems/ju-zhen-zhong-de-lu-jing-lcof/solution/dfsjian-zhi-by-logilong-9w2g/

offer13 不用回溯 用
dfs
在这里插入图片描述
bfs
在这里插入图片描述

二叉树 | 根据前序和中序构建二叉树 |递归

剑指offer 7 寻找到根节点,对左右子树递归
题解:https://leetcode-cn.com/problems/zhong-jian-er-cha-shu-lcof/solution/mian-shi-ti-07-zhong-jian-er-cha-shu-by-leetcode-s/

二叉搜索树 | 根据后序判断 |递归

offer33
https://leetcode.cn/problems/er-cha-sou-suo-shu-de-hou-xu-bian-li-xu-lie-lcof/

二叉树 | 判断是不是子结构 | 递归 | 0902

offer26 递归,利用一个函数来判断两树是否相等,再递归。
https://leetcode-cn.com/problems/shu-de-zi-jie-gou-lcof/

二叉树 | 层序遍历输出 | 队列 | 0902

offer32 用队列进行bfs,层序输出
https://leetcode-cn.com/problems/cong-shang-dao-xia-da-yin-er-cha-shu-lcof/submissions/

32-2 每输出一层就换行:
每一层放在一个数组里,出队列前记录队列中元素的个数,用for来操作下一行进队
https://leetcode-cn.com/problems/cong-shang-dao-xia-da-yin-er-cha-shu-ii-lcof/solution/mian-shi-ti-32-ii-cong-shang-dao-xia-da-yin-er-c-5/

数学问题

快速幂 offer16|offer14-2|0901

https://leetcode-cn.com/problems/shu-zhi-de-zheng-shu-ci-fang-lcof/solution/jian-dan-li-jie-kuai-su-mi-by-ollieq-rl74/

https://leetcode-cn.com/problems/jian-sheng-zi-ii-lcof/solution/jian-dan-li-jie-dong-tai-gui-hua-xun-hua-4g3o/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值