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

[其他] 缺大米的请参加这个刷题/Mock interview活动

     关闭
🔗
funfun33 2020-6-25 07:46:39 | 只看该作者
全局:
补昨天day 23

lc新5, review5
319. Bulb Switcher
square root of the input,背后的思想是一个灯泡被开关奇数次才会亮,divisor 是成对出现的,只有i是square才会是奇数次


240. Search a 2D Matrix II
从右上角找到左下角~

48. Rotate Image
从四个角开始swap

723. Candy Crush
先找到连续的cell, 从下往上遍历

333. Largest BST Subtree
bottom up dfs

评分

参与人数 1大米 +3 收起 理由
dobbin + 3 给你点个赞!

查看全部评分

回复

使用道具 举报

🔗
ztamber 2020-6-25 07:05:58 | 只看该作者
全局:
06/24
打卡第16天

• Least Moves To Asceding Array
• Unique binary search tree
• Unique binary search tree II
• Longest Substring With K Typed Characters
回复

使用道具 举报

🔗
funfun33 2020-6-25 05:43:38 | 只看该作者
全局:
补前天 day22

lc new 5 review 10+
622. Design Circular Queue
注意检查capacity!

536. Construct Binary Tree from String
分类讨论四个case: -,(,),数字

334. Increasing Triplet Subsequence
就很精妙,两个变量存 小和大,找到更大的就可

152. Maximum Product Subarray
三个变量min,max,res,遍历更新(因为要考虑负数和0

662. Maximum Width of Binary Tree
用map存每一层第一个节点的col idx, 用 最后一个节点的idx减去它就是每层的width

评分

参与人数 1大米 +3 收起 理由
dobbin + 3 给你点个赞!

查看全部评分

回复

使用道具 举报

🔗
atlas1997 2020-6-25 04:44:19 | 只看该作者
全局:
6.24 打卡6道dp

WX20200624-164339@2x.png (126.26 KB, 下载次数: 0)

WX20200624-164339@2x.png

评分

参与人数 1大米 +3 收起 理由
dobbin + 3 给你点个赞!

查看全部评分

回复

使用道具 举报

🔗
abct 2020-6-25 04:34:59 | 只看该作者
全局:
今天的四题

评分

参与人数 1大米 +3 收起 理由
dobbin + 3 给你点个赞!

查看全部评分

回复

使用道具 举报

🔗
DL 2020-6-25 04:28:21 | 只看该作者
全局:
打卡第23天, 刷了3道题

2. Add Two Numbers
linked list, 注意l1, l2 是否是null

19. Remove Nth Node From End of List
用2个指针,第一个指针指向list的前端,另一个和前一个差n位置

24. Swap Nodes in Pairs
linked list, 先判断head.next, head.next.next是否存在,然后互调。

image.png (99.64 KB, 下载次数: 2)

image.png
回复

使用道具 举报

🔗
tanlion 2020-6-25 01:46:10 | 只看该作者
全局:
打卡第十四天
101, 104,111

Screen Shot 2020-06-24 at 12.17.02.png (97.9 KB, 下载次数: 2)

Screen Shot 2020-06-24 at 12.17.02.png
回复

使用道具 举报

🔗
PLUSGSTV 2020-6-25 01:38:27 | 只看该作者
全局:
本帖最后由 PLUSGSTV 于 2020-6-25 01:39 编辑

中间准备答辩耽误了,继续打卡

192.PNG (25.72 KB, 下载次数: 2)

192.PNG

评分

参与人数 1大米 +3 收起 理由
dobbin + 3 给你点个赞!

查看全部评分

回复

使用道具 举报

🔗
rockwtr 2020-6-25 00:23:19 | 只看该作者
全局:
Day 2, solved 6 problems.

Tips:
1. Integer operations such as +, -, *, / should avoid overflow by type cast to long. e.g., LC 235;
2. If we want to find the target within the iteration loop of binary search, do NOT forget = in the loop conditional;
e.g., in LC 4, while (lo <= hi), where the '=' is a must;
3. Use dummy node for ListNode problems when necessary; e.g., LC 2.


补充内容 (2020-6-27 01:21):
抱歉,发重复了,没法删除,请忽略。

Workspace 1_002.png (86.09 KB, 下载次数: 3)

Workspace 1_002.png
回复

使用道具 举报

🔗
rockwtr 2020-6-25 00:04:20 | 只看该作者
全局:
Day 2, solved 6 problems.

Tips:
1. Integer operations such as +, -, *, / should avoid overflow by type cast to long. e.g., LC 235;
2. If we want to find the target within the iteration loop of binary search, do NOT forget = in the loop conditional;
e.g., in LC 4, while (lo <= hi), where the '=' is a must;
3. Use dummy node for ListNode problems when necessary; e.g., LC 2.

Workspace 1_002.png (86.09 KB, 下载次数: 3)

Workspace 1_002.png
回复

使用道具 举报

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

本版积分规则

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