随笔分类 - BFS
[Leetcode 111]二叉树的最短深度 BFS/DFS
摘要:题目 给定二叉树,求最短路径包含的节点个数 https://leetcode.com/problems/minimum-depth-of-binary-tree/ Given a binary tree, find its minimum depth. The minimum depth is th
阅读全文
[Leetcode 559]N叉树的最大深度Maximum Depth of N-ary Tree DFS/BFS模板
摘要:题目 https://leetcode.com/problems/maximum-depth-of-n-ary-tree/ N叉树的最大深度 Given a n-ary tree, find its maximum depth. The maximum depth is the number of
阅读全文
[Leetcode 207/210]课程计划Course Schedule I II(BFS)310
摘要:310题目类似,但是数据结构可以选的更简单 恢复内容开始 题目 先修课程和后修课,比如高数离散修完,才能修数据结构 给定numcourse门课程,int[][]的先后计划。int[i][0]为要修的当前课程,int[i][1]为学这门课之前要修的课 207/210都在问:按照int[][],所有课程
阅读全文
浙公网安备 33010602011771号