查看: 4292| 回复: 5
跳转到指定楼层
上一主题 下一主题
收起左侧

[Leetcode] 小白刷题经验+感悟 内附领扣刷题推荐顺序

🔗
匿名用户-UQYCA  2019-9-1 15:28:39 |倒序浏览

注册一亩三分地论坛,查看更多干货!

您需要 登录 才可以下载或查看附件。没有帐号?注册账号

x
本帖最后由 匿名 于 2019-9-1 15:35 编辑

用这篇文章来纪念纪念一个算法基础不怎么样的小白开始刷题的头一个月吧,希望这篇帖子可以给像我一样刚开始刷题的小伙伴一点鼓励和经验!
背景介绍:撸主九月开学研二,方向ML,7月底的时候放弃读博(朋友,家人劝阻,金钱诱惑)开始决定找工作,唯一的工作经验只有4个月暑期在prof的startup打工的经验,本科CS专业最差的就是算法课(至今没有搞懂NP reduction相关的问题什么3SAT<=>SAT不过好在找工作也不考)。总之,撸主对算法没什么好感,但是泡了几天地里,发现先要找到程序员的工作只能靠刷题,懵逼打开leetcode lintcode看到了1000+的题。。。hmmmm楼主深知短期内自己是肯定刷不完的,遂打开Google搜索刷题方法。
对于基础比较好的同学,刷高频top100-150是个不错的选择(有点像背单词的时候是顺序还是乱序TAT),但是对于基础不那么踏实或者喜欢举一反三地同学,按照算法来刷是比较好的。
附录里楼主写一下自己的总结的一些有代表性的题吧,把这些题刷了之后/答案看懂之后就可以掌握对应的算法大半。
关于刷题的心得:1. 不要死磕,做不出来的就等一天在做,但是一定要push自己去思考,想30min后想不出来看discussion,再想不出来看答案,再看不懂答案就去油管找视频。
2. 每刷完一道题就写好总结归类,Onenote或者excel记录刷题步骤地里有很多同学写过了,excel记录进度按时复习定期重刷,Onenote记录题里的坑,不同的算法等等。善用每道题的tag和similar problems,这个可以加速刷题的效率让你举一反三!
同样:如果已经有了target公司,一定要刷刷题网站的题库+看地里的面经!!!面经可以让你熟悉公司出题的风格,难度。
这是撸主觉得每种算法比较有代表性的题:

Array:
https://www.lintcode.com/problem ... -arrays/description
https://www.lintcode.com/problem/maximum-subarray/description
https://www.lintcode.com/problem ... ray-sum/description
https://www.lintcode.com/problem/two-sum/description

BFS & DFS & Recursion & Iteration
https://www.lintcode.com/problem ... aversal/description
https://www.lintcode.com/problem ... aversal/description
https://www.lintcode.com/problem ... aversal/description
https://www.lintcode.com/problem ... aversal/description
每道题对应的几种不同的方法全部搞懂,如果不懂油管上有huahua酱的讲解不错
https://www.lintcode.com/problem/permutations/description
https://www.lintcode.com/problem/permutations-ii/description
https://www.lintcode.com/problem/n-queens/description
https://www.lintcode.com/problem/word-ladder/description
https://www.lintcode.com/problem/subsets/description

Binary Search
https://www.lintcode.com/problem ... -search/description
https://www.lintcode.com/problem ... -target/description
https://www.lintcode.com/problem/first-bad-version/description
https://www.lintcode.com/problem ... d-array/description
https://www.lintcode.com/problem ... trix-ii/description


Binary Tree
https://www.lintcode.com/problem/minimum-subtree/description
https://www.lintcode.com/problem ... er-tree/description
https://www.lintcode.com/problem ... ry-tree/description
https://www.lintcode.com/problem ... ry-tree/description


Linked List
https://www.lintcode.com/problem/reverse-linked-list/description
https://www.lintcode.com/problem/linked-list-cycle/description
https://www.lintcode.com/problem ... pointer/description
https://www.lintcode.com/problem/lru-cache/description
https://www.lintcode.com/problem ... d-lists/description
https://www.lintcode.com/problem ... ed-list/description

Two Pointers
https://www.lintcode.com/problem/window-sum/description
https://www.lintcode.com/problem/move-zeroes/description
https://www.lintcode.com/problem/valid-palindrome/description
two sum 各种变种
https://www.lintcode.com/problem/two-sum/description
https://www.lintcode.com/problem ... -target/description
https://www.lintcode.com/problem/two-sum-unique-pairs/description
https://www.lintcode.com/problem ... -target/description
https://www.lintcode.com/problem/3sum/description

Sort (Merge Quick)
https://www.lintcode.com/problem/kth-largest-element/description
https://www.lintcode.com/problem ... d-array/description
https://www.lintcode.com/problem/sort-integers-ii/description
https://www.lintcode.com/problem/reverse-pairs/description
https://www.lintcode.com/problem/count-of-range-sum/description
https://www.lintcode.com/problem/sort-integers-ii/description
https://www.lintcode.com/problem/sort-colors-ii/description

Graph
https://www.lintcode.com/problem/graph-valid-tree/description
https://www.lintcode.com/problem/clone-graph/description
https://www.lintcode.com/problem/topological-sorting/description
https://www.lintcode.com/problem/number-of-islands/description
https://www.lintcode.com/problem/knight-shortest-path/description

DP这种东西嘛。。。好像遇到新题也不怎么会了,感觉学习曲线是非线性的
https://www.lintcode.com/problem/minimum-path-sum/description
https://www.lintcode.com/problem/climbing-stairs/description
https://www.lintcode.com/problem/unique-paths/description

撸主Onenote来记录刷题的心得,坑,或者没有想到的地方。


撸主自己用这样一个excel来总结刷题的进度,这样可以督促自己按时复习~




有想组队的可以联系楼主,有别的问题和建议也欢迎提出!
求一波米啊啊啊啊啊,没米很多面经看不到啊啊啊!




评分

参与人数 13大米 +20 收起 理由
mengmeng4263 + 2 很有用的信息!
cr1215 + 2 给你点个赞!
cicely56 + 1 给你点个赞!
yoonching + 1 给你点个赞!
biubiubiu.Siv + 2 给你点个赞!

查看全部评分


上一篇:业余时间从算法0基础刷题,到面试拿offer的一些经验
下一篇:准备刷Data Structure 和 Algorithm 只会Python 有课程可以推的吗?
全局:
能不能借用一下你的excel sheet或者note啊?
回复

使用道具 举报

全局:
firefall17 发表于 2019/09/01 23:55:58
能不能借用一下你的excel sheet或者note啊?

好啊好啊没问题!
回复

使用道具 举报

全局:
早点看到就好了😂
回复

使用道具 举报

🔗
cicely56 2020-3-6 05:54:54 | 只看该作者
全局:
我可不可以也求下楼主的excel模板~~
回复

使用道具 举报

🔗
garychian 2020-3-10 22:20:34 | 只看该作者
全局:
urmyu 发表于 2019-9-2 12:39
好啊好啊没问题!

楼主我也可以借用一下吗?
回复

使用道具 举报

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

本版积分规则

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