没有合适的资源?快使用搜索试试~ 我知道了~
最大公共字符串leetcode-leetcode:坚持每周刷一道LeetCode题
共10个文件
java:9个
md:1个
需积分: 27 0 下载量 105 浏览量
2021-07-01
01:20:49
上传
评论
收藏 12KB ZIP 举报
温馨提示
最大公共字符串leetcode leetcode刷题打卡 接下来,坚持每周至少刷一道LeetCode题,刷题顺利按照牛客网LeetCode经典题目顺序进行,记录解题思路,与大家共享,同时也做个自我监督 第一周 1、树 题目: Given a binary tree, find its minimum depth.The minimum depth is the number of nodes along the shortest path from the root node down to the nearest leaf node. 解题思路: 思路一:深度优先遍历,递归遍历左右子树,遇到叶子节点时返回 1,返回过程中,比较左右子树,较小深度逐层加1。 思路二:广度优先遍历,逐层遍历节点,遇到第一个叶子节点返回其深度; 代码: 2、栈 题目: Evaluate the value of an arithmetic expression in Reverse Polish Notation. Valid operators are+,-,*,/. Each operand may b
资源推荐
资源详情
资源评论
收起资源包目录
leetcode-master.zip (10个子文件)
leetcode-master
src
solution
EvaluteReversePolishNotation.java 1KB
BinaryTreePostorderTraversal.java 2KB
ReorderList.java 1KB
MinimumDepthOfBinaryTree.java 2KB
TwoSum.java 1009B
MaxPointsOnALine.java 1KB
BInaryTreePreOrderTraversal.java 1KB
InsertionSortList.java 1KB
SortList.java 1KB
README.md 13KB
共 10 条
- 1
资源评论
weixin_38642369
- 粉丝: 4
- 资源: 949
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功