楼主: 胖头龙
跳转到指定楼层
上一主题 下一主题
收起左侧

[其他] 胖头龙的咸鱼刷题笔记-算法篇

   
🔗
大芒果 2020-12-17 17:54:13 | 只看该作者
全局:
不要鸽好吗
回复

使用道具 举报

🔗
zyou327 2020-12-17 23:41:44 | 只看该作者
全局:
求不鸽+1 555
回复

使用道具 举报

🔗
yoloyolo21 2020-12-18 03:53:42 | 只看该作者
全局:
"并且同学们大多都是二十多岁的中老年人"..........WHO不是40才算中年。。。
回复

使用道具 举报

🔗
kkrrt 2020-12-18 09:09:02 | 只看该作者
全局:
感谢楼主 先插个眼
回复

使用道具 举报

🔗
dhd0508 2020-12-24 14:39:08 来自APP | 只看该作者
全局:
难得的常看常新的帖子
回复

使用道具 举报

🔗
dhd0508 2020-12-27 13:57:26 来自APP | 只看该作者
全局:
Colley 发表于 2020-11-01 20:36:38
谢谢楼主,楼主用什么软件来记笔记的跟刷题表的呢?
同问,楼主用的是什么软件记笔记呢?
回复

使用道具 举报

🔗
zyou327 2020-12-29 23:17:46 | 只看该作者
全局:
蹲不到更新了555
回复

使用道具 举报

🔗
 楼主| 胖头龙 2020-12-31 09:41:30 | 只看该作者
全局:


第七章 宽度优先搜索



基本问题:
(1)如果复杂程度类似, 面试中尽量优先使用BFS
(2)BFS主要几种场景: 层级遍历,拓扑排序,图上搜索(包括二叉树,矩阵)
(3)Queue的使用技巧,BFS的终止条件?
(4)什么时候使用分层?什么时候不需要?实现的时候的区别在哪里?
(5)拓扑排序的概念?如何判断是否存在拓扑排序?是否存在唯一的拓扑排序?找到所有拓扑排序?
(6)什么时候需要使用set记录访问过的节点?(为什么二叉树上的BFS往往不需要set?)什么时候需要map记录到达过的节点距离?
(7)如何在矩阵中遍历下一步的所有节点?如果每次可能走不止一步怎么办(Maze II)?
(8)为什么BFS解决的基本都是简单图(边长为1)问题?如果边长不为1,该怎么办?
(9)BFS的时空复杂度估算?
(10)如何使用双向BFS进行优化?



BFS题目列表:
必背:紫色核心:蓝色重点:绿色普通:黄色;默认是LeetCode,如果是LintCode会以Lint开头)


二叉树:

297. Serialize and Deserialize Binary Tree
https://leetcode.com/problems/se ... ialize-binary-tree/

102. Binary Tree Level Order Traversal
https://leetcode.com/problems/binary-tree-level-order-traversal/

103. Binary Tree Zigzag Level Order Traversal
https://leetcode.com/problems/bi ... el-order-traversal/

107. Binary Tree Level Order Traversal II
https://leetcode.com/problems/bi ... order-traversal-ii/

513. Find Bottom Left Tree Value
https://leetcode.com/problems/find-bottom-left-tree-value/

Lint-242. Convert Binary Tree to Linked Lists by Depth
https://www.lintcode.com/problem ... y-depth/description



拓扑排序:

Lint-127. Topological Sorting
https://www.lintcode.com/problem/topological-sorting/description

207. Course Schedule
https://leetcode.com/problems/course-schedule/

210. Course Schedule II
https://leetcode.com/problems/course-schedule-ii/

269. Alien Dictionary
https://leetcode.com/problems/alien-dictionary/

444. Sequence Reconstruction
https://leetcode.com/problems/sequence-reconstruction/



矩阵:

200. Number of Islands
https://leetcode.com/problems/number-of-islands/

490. The Maze
https://leetcode.com/problems/the-maze/

505. The Maze II
https://leetcode.com/problems/the-maze-ii/

542. 01 Matrix
https://leetcode.com/problems/01-matrix/

733. Flood Fill
https://leetcode.com/problems/flood-fill/

994. Rotting Oranges
https://leetcode.com/problems/rotting-oranges/

305. Number of Islands II
https://leetcode.com/problems/number-of-islands-ii/

773. Sliding Puzzle
https://leetcode.com/problems/sliding-puzzle/

Lint-573. Build Post Office II
https://www.lintcode.com/problem/build-post-office-ii/description

Lint-598. Zombie in Matrix
https://www.lintcode.com/problem/zombie-in-matrix/description

Lint-611. Knight Shortest Path
https://www.lintcode.com/problem/knight-shortest-path/description

Lint-794. Sliding Puzzle II
https://www.lintcode.com/problem/sliding-puzzle-ii/description



图:

133. Clone Graph
https://leetcode.com/problems/clone-graph/

127. Word Ladder
https://leetcode.com/problems/word-ladder/

261. Graph Valid Tree
https://leetcode.com/problems/graph-valid-tree/

841. Keys and Rooms
https://leetcode.com/problems/keys-and-rooms/

323. Number of Connected Components in an Undirected Graph
https://leetcode.com/problems/nu ... n-undirected-graph/

1306. Jump Game III
https://leetcode.com/problems/jump-game-iii/

Lint-531. Six Degree
https://www.lintcode.com/problem/six-degrees/description

Lint-618. Search Graph Nodes
https://www.lintcode.com/problem/search-graph-nodes/description

Lint-624. Remove Substrings
https://www.lintcode.com/problem/remove-substrings/description




评分

参与人数 16大米 +47 收起 理由
ml3749963 + 1 给你点个赞!
kj2500 + 1 给你点个赞!
zeroreh + 2 很有用的信息!
hsyfo + 2 欢迎分享你知道的情况,会给更多积分奖励!
casunshine + 1 很有用的信息!

查看全部评分

回复

使用道具 举报

🔗
htcgo 2020-12-31 10:26:46 来自APP | 只看该作者
全局:
6666强强
回复

使用道具 举报

🔗
zyou327 2021-1-8 12:54:08 | 只看该作者
全局:
居然更新了!
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册账号
隐私提醒:
  • ☑ 禁止发布广告,拉群,贴个人联系方式:找人请去🔗同学同事飞友,拉群请去🔗拉群结伴,广告请去🔗跳蚤市场,和 🔗租房广告|找室友
  • ☑ 论坛内容在发帖 30 分钟内可以编辑,过后则不能删帖。为防止被骚扰甚至人肉,不要公开留微信等联系方式,如有需求请以论坛私信方式发送。
  • ☑ 干货版块可免费使用 🔗超级匿名:面经(美国面经、中国面经、数科面经、PM面经),抖包袱(美国、中国)和录取汇报、定位选校版
  • ☑ 查阅全站 🔗各种匿名方法

本版积分规则

>
快速回复 返回顶部 返回列表