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

佛系转码每日随便几题打卡

全局:

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

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

x
本帖最后由 doudouadventure 于 2021-1-11 09:59 编辑

去年九月开始在职自学编程,转不转码还不知道,看心情看机会。目前上完了cs50,看完head first java,即将上完61B,有刷题的基础了,LC零零星星做了20题。接下来打算做些project看自己喜不喜欢,LC也不能停(感恩节花重金买了会员,可不能浪费了!)。题不在多,每天都刷就行,要求不高,一道easy都够,主要保持手感。看看能走多远吧:)

上一篇:[刷题]从来没坚持超过两周的我
下一篇:刷题跳槽打卡贴
推荐
 楼主| doudouadventure 2021-2-22 07:42:35 | 只看该作者
全局:
好久没来打卡,断断续续做了一些题,tree专题复习完了,接下来打算做一下array and string专题
297        Serialize and Deserialize Binary Tree
124        Binary Tree Maximum Path Sum
98        Validate Binary Search Tree
863        All Nodes Distance K in Binary Tree
103        Binary Tree Zigzag Level Order Traversal
543        Diameter of Binary Tree
545        Boundary of Binary Tree
173        Binary Search Tree Iterator
226        Invert Binary Tree
572        Subtree of Another Tree
426        Convert Binary Search Tree to Sorted Doubly Linked List
724        Find a pivot index
747        Largest Number At Least Twice of Others
66        Plus One
回复

使用道具 举报

推荐
 楼主| doudouadventure 2021-1-31 09:17:53 | 只看该作者
全局:
1/24/21
105        Construct Binary Tree from Preorder and Inorder Traversal        Medium

1/25/21
116        Populating Next Right Pointers in Each Node        Medium

1/26/21
117        Populating Next Right Pointers in Each Node II        Medium

1/30/21
236        Lowest Common Ancestor of a Binary Tree        Medium

一天一题都没做到,这该死的全职。。。
回复

使用道具 举报

推荐
 楼主| doudouadventure 2021-1-11 10:34:25 | 只看该作者
全局:
1/10/2021

1299. Replace Elements with Greatest Element on Right Side - easy; 今天开始掐时间做题,easy题5分钟内必须有思路,有思路以后10分钟写完并提交通过。第一遍先写brute force。完成上述步骤再进行改进,如果已经有想法就直接写,没想法可以看solution或者discussion获得一些hint,不要直接看code。然后自己写optimized solution,以上一系列动作争取easy题20分钟内完成。medium最近还没做到,以后再说。

今天这道题第一遍brute force,time complexity O(N^2)。完成后又优化了一下,iteration从后往前来实现one-pass,time complexitiy O(N).
回复

使用道具 举报

🔗
 楼主| doudouadventure 2021-1-12 11:39:16 | 只看该作者
全局:
1/11/2021

26. Remove Duplicates from Sorted Array - easy; 这道题之前做到过,当时就尝试着用了传说中的双指针,但是其实不知道到底什么是双指针,就猜是两个locationtracker。今天在array专题正式看到two-pointers technique,简单来说就是use a writePointer and readPointer to do in-place operation in one pass。是个不错的套路。
回复

使用道具 举报

🔗
 楼主| doudouadventure 2021-1-13 09:25:47 | 只看该作者
全局:
1/12/2021

283.Move Zeroes - easy

905.Sort array by parity - easy

27.Remove Element - easy

487.Max Consecutive Ones II - medium

448. Find All Numbers Disappeared in an Array - easy

补充内容 (2021-1-13 10:54):
晚上做了一道 42. Trapping Rain Water - hard
回复

使用道具 举报

🔗
 楼主| doudouadventure 2021-1-14 08:02:29 | 只看该作者
全局:
1/13/21

56.Merge Intervals - medium
238.Product of Array Except Self - medium
121.Best Time to Buy and Sell Stock - easy
53.Maximum Subarray - easy
回复

使用道具 举报

🔗
 楼主| doudouadventure 2021-1-15 11:40:39 | 只看该作者
全局:
1/14/21

4.Median of Two Sorted Arrays - hard
题目本身不难,难的是要求time complexity O(log(m+n)).官方答案下面都是“什么鬼“,我就没看官方答案。有人推荐这个答案https://medium.com/@hazemu/findi ... c-time-1d3f2ecbeb46;我觉得思路是不错的。
回复

使用道具 举报

🔗
 楼主| doudouadventure 2021-1-16 04:04:11 | 只看该作者
全局:
1/15/21

15.3Sum - medium
回复

使用道具 举报

🔗
 楼主| doudouadventure 2021-1-20 03:17:13 | 只看该作者
全局:
1/19/21
31.Next Permutation - medium; permutation in lexicographical order
380.Insert Delete GetRandom O(1) - medium

我有罪,三天没刷题
回复

使用道具 举报

🔗
 楼主| doudouadventure 2021-1-21 07:49:09 | 只看该作者
全局:
1/20/21
最近开始做tree的题
199.Binary Tree Right Side View
144.Binary Tree Preorder Traversal
94.Binary Tree Inorder Traversal
145.Binary Tree Postorder Traversal
102Binary Tree Level Order Traversal

leetcode突破40题了,没想到没想到
回复

使用道具 举报

🔗
 楼主| doudouadventure 2021-1-22 06:08:32 | 只看该作者
全局:
1/21/21
104.Maximum Depth of Binary Tree
101.Symmetric Tree
112.Path Sum
250.Count Univalue Subtrees

今天做题感觉自己可太辣鸡了
回复

使用道具 举报

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

本版积分规则

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