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

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

   
🔗
zyou327 2021-2-4 11:57:07 | 只看该作者
全局:
持续追更,感谢楼主!!!!
回复

使用道具 举报

🔗
yeetatbig4 2021-2-6 06:07:25 | 只看该作者
全局:
胖头龙 发表于 2021-2-4 06:10
第 9 章 深度优先搜索

基本问题:
居然错过了更新!来补上
回复

使用道具 举报

🔗
happypuppy 2021-2-9 12:43:44 | 只看该作者
全局:
请问一共有多少章,啥时候才能完结撒花啊?
回复

使用道具 举报

🔗
zyou327 2021-2-12 02:10:10 | 只看该作者
全局:
happypuppy 发表于 2021-2-8 23:43
请问一共有多少章,啥时候才能完结撒花啊?

同问 感觉已经更了小半年了
回复

使用道具 举报

🔗
xingxing777 2021-2-13 11:49:53 | 只看该作者
全局:
谢谢楼主
分享很有用 收藏了
回复

使用道具 举报

🔗
xiongml81 2021-2-16 06:52:21 | 只看该作者
本楼:
全局:
谢谢,有用
回复

使用道具 举报

🔗
 楼主| 胖头龙 2021-2-21 11:42:40 | 只看该作者
全局:
本帖最后由 胖头龙 于 2021-2-21 11:45 编辑

第十章 数据结构

基本问题:
(1) 本章按照数据结构分类一些问题,和之前按算法分类的题目相比可能会有重复,因为一道题可能有多个标签。
(2) 对于每种数据结构,需要先学习掌握其基本原理,优缺点,复杂度,和对应语言中的API用法。对于其基本的实现方式也要了解。
(3) Array,Matrix,String,Hash都是一些常用的数据结构,一般在各种题里都会用到,这里主要列举一些没有涉及到其他算法的题目。
(4) Linked List往往自成一类,会涉及到一些pointer操作,需要细心。
(5) Queue一般用在BFS里面比较多,这里不单独列举了。
(6) Heap, Stack往往和其他知识点混用,但自己单独出题也可以。
(7) Trie,Union Find, Sweep Line的套路比较明显,需要记住模板。
(8) Binary Index Tree 和Segment Tree涉及到的题目有限,需要记住模板。Segment Tree解法一般来说可以覆盖BIT能解决的问题,但是BIT写起来短一些。
(9) 复合数据结构里面LRU和LFU相对比较重要。其他的在掌握基本数据结构即复杂度之后,可以随机应变。

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


Array & Matrix:
442. Find All Duplicates in an Array
https://leetcode.com/problems/find-all-duplicates-in-an-array/

48. Rotate Image
https://leetcode.com/problems/rotate-image/

54. Spiral Matrix
https://leetcode.com/problems/spiral-matrix/

73. Set Matrix Zeroes
https://leetcode.com/problems/set-matrix-zeroes/

289. Game of Life
https://leetcode.com/problems/game-of-life/


String:
6. ZigZag Conversion
https://leetcode.com/problems/zigzag-conversion/

13. Roman to Integer
https://leetcode.com/problems/roman-to-integer/

14. Longest Common Prefix
https://leetcode.com/problems/longest-common-prefix/

68. Text Justification
https://leetcode.com/problems/text-justification/

443. String Compression
https://leetcode.com/problems/string-compression/


Linked List:
2. Add Two Numbers
https://leetcode.com/problems/add-two-numbers/

21. Merge Two Sorted Lists
https://leetcode.com/problems/merge-two-sorted-lists/

25. Reverse Nodes in k-Group
https://leetcode.com/problems/reverse-nodes-in-k-group/

82. Remove Duplicates from Sorted List II
https://leetcode.com/problems/re ... rom-sorted-list-ii/

83. Remove Duplicates from Sorted List
https://leetcode.com/problems/remove-duplicates-from-sorted-list/

86. Partition List
https://leetcode.com/problems/partition-list/

92. Reverse Linked List II
https://leetcode.com/problems/reverse-linked-list-ii/

138. Copy List with Random Pointer
https://leetcode.com/problems/copy-list-with-random-pointer/

141. Linked List Cycle
https://leetcode.com/problems/linked-list-cycle/

148. Sort List
https://leetcode.com/problems/sort-list/

160. Intersection of Two Linked Lists
https://leetcode.com/problems/intersection-of-two-linked-lists/

203. Remove Linked List Elements
https://leetcode.com/problems/remove-linked-list-elements/

206. Reverse Linked List
https://leetcode.com/problems/reverse-linked-list/

234. Palindrome Linked List
https://leetcode.com/problems/palindrome-linked-list/

328. Odd Even Linked List
https://leetcode.com/problems/odd-even-linked-list/

445. Add Two Numbers II
https://leetcode.com/problems/add-two-numbers-ii/

142. Linked List Cycle II
https://leetcode.com/problems/linked-list-cycle-ii/

876. Middle of the Linked List
https://leetcode.com/problems/middle-of-the-linked-list/


Hash:
706. Design HashMap
https://leetcode.com/problems/design-hashmap/

49. Group Anagrams
https://leetcode.com/problems/group-anagrams/

128. Longest Consecutive Sequence
https://leetcode.com/problems/longest-consecutive-sequence/

560. Subarray Sum Equals K
https://leetcode.com/problems/subarray-sum-equals-k/

953. Verifying an Alien Dictionary
https://leetcode.com/problems/verifying-an-alien-dictionary/

290. Word Pattern
https://leetcode.com/problems/word-pattern/


Heap:
23. Merge k Sorted Lists
https://leetcode.com/problems/merge-k-sorted-lists/

295. Find Median from Data Stream
https://leetcode.com/problems/find-median-from-data-stream/

347. Top K Frequent Elements
https://leetcode.com/problems/top-k-frequent-elements/

692. Top K Frequent Words
https://leetcode.com/problems/top-k-frequent-words/

767. Reorganize String
https://leetcode.com/problems/reorganize-string/

973. K Closest Points to Origin
https://leetcode.com/problems/k-closest-points-to-origin/

480. Sliding Window Median
https://leetcode.com/problems/sliding-window-median/

703. Kth Largest Element in a Stream
https://leetcode.com/problems/kth-largest-element-in-a-stream/


Stack:
155. Min Stack
https://leetcode.com/problems/min-stack/

20. Valid Parentheses
https://leetcode.com/problems/valid-parentheses/

85. Maximal Rectangle
https://leetcode.com/problems/maximal-rectangle/

224. Basic Calculator
https://leetcode.com/problems/basic-calculator/

227. Basic Calculator II
https://leetcode.com/problems/basic-calculator-ii/

394. Decode String
https://leetcode.com/problems/decode-string/

1249. Minimum Remove to Make Valid Parentheses
https://leetcode.com/problems/mi ... -valid-parentheses/


Monotonic Stack:
300. Longest Increasing Subsequence (Patience Sort)
https://leetcode.com/problems/longest-increasing-subsequence/

84. Largest Rectangle in Histogram
https://leetcode.com/problems/largest-rectangle-in-histogram/

239. Sliding Window Maximum
https://leetcode.com/problems/sliding-window-maximum/

1019. Next Greater Node In Linked List
https://leetcode.com/problems/next-greater-node-in-linked-list/


Trie:
208. Implement Trie (Prefix Tree)
https://leetcode.com/problems/implement-trie-prefix-tree/

211. Design Add and Search Words Data Structure
https://leetcode.com/problems/de ... rds-data-structure/

1032. Stream of Characters
https://leetcode.com/problems/stream-of-characters/


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

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

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


Sweep Line:
Lint-391. Number of Airplanes in the Sky
https://www.lintcode.com/problem ... the-sky/description

252. Meeting Rooms
https://leetcode.com/problems/meeting-rooms/

253. Meeting Rooms II
https://leetcode.com/problems/meeting-rooms-ii/


Binary Index Tree & Segment Tree:
307. Range Sum Query - Mutable
https://leetcode.com/problems/range-sum-query-mutable/

327. Count of Range Sum
https://leetcode.com/problems/count-of-range-sum/

715. Range Module
https://leetcode.com/problems/range-module/

315. Count of Smaller Numbers After Self
https://leetcode.com/problems/co ... numbers-after-self/

493. Reverse Pairs
https://leetcode.com/problems/reverse-pairs/



Complex Data Structure:
146. LRU Cache
https://leetcode.com/problems/lru-cache/

460. LFU Cache
https://leetcode.com/problems/lfu-cache/

211. Design Add and Search Words Data Structure
https://leetcode.com/problems/de ... rds-data-structure/

380. Insert Delete GetRandom O(1)
https://leetcode.com/problems/insert-delete-getrandom-o1/

528. Random Pick with Weight
https://leetcode.com/problems/random-pick-with-weight/

588. Design In-Memory File System
https://leetcode.com/problems/design-in-memory-file-system/

981. Time Based Key-Value Store
https://leetcode.com/problems/time-based-key-value-store/

1396. Design Underground System
https://leetcode.com/problems/design-underground-system/

评分

参与人数 11大米 +16 收起 理由
EasonY + 1 给你点个赞!
waileisea + 1 很有用的信息!
ml3749963 + 1 很有用的信息!
zk_shadow + 1 给你点个赞!
kj2500 + 1 给你点个赞!

查看全部评分

回复

使用道具 举报

🔗
Mr.Sagemaker 2021-2-22 03:13:15 | 只看该作者
全局:
总结的太棒叻! 持续追更,感谢楼主!!!!

评分

参与人数 1大米 +2 收起 理由
胖头龙 + 2 谢谢支持

查看全部评分

回复

使用道具 举报

🔗
imperfection 2021-2-22 07:09:17 | 只看该作者
全局:
感谢楼主哈哈哈哈 在跟几个小伙伴按照你的list进行复习 非常有帮助(包括前面的方法论和对刷题的理解)

评分

参与人数 1大米 +2 收起 理由
胖头龙 + 2 谢谢支持

查看全部评分

回复

使用道具 举报

🔗
yeetatbig4 2021-2-22 15:30:01 | 只看该作者
全局:
胖头龙 发表于 2021-2-21 11:42
第十章 数据结构

基本问题:
个人认为第十章的分类特能表明lz的高水平
回复

使用道具 举报

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

本版积分规则

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