查看: 11290| 回复: 96
收起左侧

俩娃大妈在职刷题

   
suhehe 来自APP | 显示全部楼层
本楼:   👍  18
100%
0%
0   👎
全局:   881
97%
3%
23

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

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

x
现在的工作活多钱少假期少,为了追求WLB,虽然现在一人带两娃(丧偶式教育),还是争取能尽早找到一份合适的工作。上星期我每晚上8点半赶娃上床后,居然还能每天刷一两道easy的题,颇感振奋。上星期刷了leetcode 1,7, 9,13,14, 20, 21, 26, 27, 28,35, 38.
今天老公又是夜班。赶娃上床后,刷了:
53. Maximum Subarray, Rumtime 0ms;58. Length of Last Word,Runtime: 1 ms, faster than 100.00% of 。。。;
66. Plus One,Rumtime 0ms。
洗洗睡了。

评分

参与人数 20大米 +30 收起 理由
ayuhime + 1 赞一个
fifiteen82726 + 1 赞一个
FlashPilot + 1 很有用的信息!
alonzothezo + 1 给你点个赞!
lanseduonaohe + 2 给你点个赞!

查看全部评分


上一篇:线下刷题小组
下一篇:每天记录一下学习情况
KellyHe 2019-3-26 17:04:30 来自APP | 显示全部楼层
本楼:   👍  1
100%
0%
0   👎
全局:   37
95%
5%
2
看到楼主的这里,突然想到一句俗话“比你优秀的人还比你努力”原以为楼主博士学历 已经比平常要优秀很多了,而且现在还是在职妈妈如此之忙,还能这么静心努力,敬佩+学习!

评分

参与人数 1大米 +5 收起 理由
suhehe + 5 谢谢支持!

查看全部评分

回复

使用道具 举报

pengzhao0524 2019-4-9 09:19:34 | 显示全部楼层
本楼:   👍  0
0%
0%
0   👎
全局:   98
96%
4%
4
本帖最后由 pengzhao0524 于 2019-4-9 09:21 编辑
suhehe 发表于 2019-4-8 11:42
我刚刷了三周。第一周刷12道题,第二周25道题,第三周目前刷了25道题。都是easy的,不过感觉越刷越快。我 ...

多谢分享!目前我刷了大约150道easy的。最近开始刷medium。我感觉我的脑子有点儿跟不上似的,有时候,反复理解,但是仍然似懂非懂。

我没有看书(上学时学过数据结构与算法,但是是很多年前了),就是一边刷题,遇到不懂的概念,就在wiki, geek for geeks、youtube等地方找找讲解。不知道还有什么更适合我的方法。有机会多交流,共勉。
回复

使用道具 举报

 楼主| suhehe 2019-7-31 04:20:05 | 显示全部楼层
本楼:   👍  0
0%
0%
0   👎
全局:   881
97%
3%
23
本帖最后由 suhehe 于 2019-7-31 05:10 编辑

258. Add Digits
while loop or recursion, Time complexity O(log N), Space complexity O(1)
Use math: a * 10^k % 9 = a (because of 10^k % 9 = 1), we can do Time O(1) and Space O(1).
1085. Sum of Digits in the Minimum Number
跟上题的不一样的地方是,只要一个while loop。首先用O(n) 求 min,在求sumOfdigits. Time O(n) and Space O(1).
回复

使用道具 举报

 楼主| suhehe 2019-3-27 09:06:39 来自APP | 显示全部楼层
本楼:   👍  0
0%
0%
0   👎
全局:   881
97%
3%
23
67. Add Binary: 用StringBuilder 比用String快,而且省空间:Runtime: 1 ms, faster than 99.92% of Java online submissions for Add Binary.
Memory Usage: 36.9 MB, less than 63.06% of Java online submissions for Add Binary.
回复

使用道具 举报

 楼主| suhehe 2019-3-27 09:14:35 来自APP | 显示全部楼层
本楼:   👍  0
0%
0%
0   👎
全局:   881
97%
3%
23
69. Sqrt(x): Binary search: Runtime: 1 ms, faster than 100.00% of Java online submissions for Sqrt(x).
Memory Usage: 32.4 MB, less than 100.00% of Java online submissions for Sqrt(x).
回复

使用道具 举报

 楼主| suhehe 2019-3-27 09:20:53 来自APP | 显示全部楼层
本楼:   👍  0
0%
0%
0   👎
全局:   881
97%
3%
23
70. Climbing Stairs: 用fibonacci sequence解 Runtime: 0 ms, faster than 100.00% of Java online submissions for Climbing Stairs.
Memory Usage: 31.5 MB, less than 100.00% of Java online submissions for Climbing Stairs.
回复

使用道具 举报

 楼主| suhehe 2019-3-27 09:35:16 来自APP | 显示全部楼层
本楼:   👍  0
0%
0%
0   👎
全局:   881
97%
3%
23
83. Remove Duplicates from Sorted List 注意避免死循环
Runtime: 0 ms, faster than 100.00% of Java online submissions for Remove Duplicates from Sorted List.
Memory Usage: 37.6 MB, less than 58.02% of Java online submissions for Remove Duplicates from Sorted List.
回复

使用道具 举报

 楼主| suhehe 2019-3-27 10:12:37 来自APP | 显示全部楼层
本楼:   👍  0
0%
0%
0   👎
全局:   881
97%
3%
23
88. Merge Sorted Array Runtime: 0 ms, faster than 100.00% of Java online submissions for Merge Sorted Array.
Memory Usage: 37.2 MB, less than 95.81% of Java online submissions for Merge Sorted Array.
回复

使用道具 举报

 楼主| suhehe 2019-3-27 10:19:33 来自APP | 显示全部楼层
本楼:   👍  0
0%
0%
0   👎
全局:   881
97%
3%
23
KellyHe 发表于 2019/03/26 17:04:30
看到楼主的这里,突然想到一句俗话“比你优秀的人还比你努力”原以为楼主博士学历 已经比平常要优秀很多了,而且现在还是在职妈妈如此之忙,还能这么静心努力,敬佩+学习!

谢谢您的支持!在您的鼓励下,我今天一鼓作气刷了5道easy的题(^_^),目前共刷了20题。洗洗睡了。明天早上6点半要起床给娃准备早餐,还有给晚餐备菜(要是我早上不把菜洗好切好,晚上来不及做饭给娃和老公吃,命苦!)
回复

使用道具 举报

 楼主| suhehe 2019-3-27 10:37:47 来自APP | 显示全部楼层
本楼:   👍  0
0%
0%
0   👎
全局:   881
97%
3%
23
临睡前又过了一遍,发现第二页就剩一道easy 的题,赶紧做了.
100. Same Tree 妈呀!我第一次只写了一次就成功成最快:Runtime: 0 ms, faster than 100.00% of Java online submissions for Same Tree.
Memory Usage: 35.6 MB, less than 96.28% of Java online submissions for Same Tree.
回复

使用道具 举报

 楼主| suhehe 2019-3-28 10:45:01 来自APP | 显示全部楼层
本楼:   👍  0
0%
0%
0   👎
全局:   881
97%
3%
23
101. Symmetric Tree  1) Recursion method: Runtime: 0 ms, faster than 100.00% of Java online submissions for Symmetric Tree.
Memory Usage: 39.3 MB, less than 19.92% of Java online submissions for Symmetric Tree.  2) BFS using one queue: Runtime: 1 ms, faster than 98.16% of Java online submissions for Symmetric Tree.
Memory Usage: 37.1 MB, less than 91.65% of Java online submissions for Symmetric Tree.
妈呀!这道题磨了一个小时

补充内容 (2019-3-28 10:53):
104. Maximum Depth of Binary Tree Recursion: Runtime: 0 ms, faster than 100.00% of Java online submissions for Maximum Depth of Binary Tree.
Memory Usage: 39.8 MB, less than 7.03% of Java online submissions for Maximum Depth of Binary Tree.
累了,不try其它解法了

补充内容 (2019-3-28 11:22):
108. Convert Sorted Array to Binary Search Tree  Binary Search 变体:Runtime: 0 ms, faster than 100.00% of Java online submissions for Convert Sorted Array to Binary Search Tree.
Memory Usage: 37.2 MB, less than 99.22% of Java online submissions for Convert Sorted Array to Binary Search Tree.
做完三道题真是累了,洗洗睡了
回复

使用道具 举报

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

本版积分规则

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