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

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

     关闭
🔗
lswalker 2020-6-18 04:56:54 | 只看该作者
本楼:
全局:
打卡 day 16

Screen Shot 2020-06-17 at 1.36.48 PM.png (59.52 KB, 下载次数: 0)

Screen Shot 2020-06-17 at 1.36.48 PM.png

评分

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

查看全部评分

回复

使用道具 举报

🔗
abct 2020-6-18 04:48:59 | 只看该作者
全局:
今天的六题打卡


评分

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

查看全部评分

回复

使用道具 举报

🔗
tanlion 2020-6-18 02:12:28 | 只看该作者
全局:
打卡第十一天:
701, 230, 108

感觉应该先左BFS和DFS再来做BST。。。。

Screen Shot 2020-06-17 at 13.10.28.png (122.24 KB, 下载次数: 0)

Screen Shot 2020-06-17 at 13.10.28.png
回复

使用道具 举报

🔗
atlas1997 2020-6-18 00:18:17 | 只看该作者
全局:
6.17 打卡6道Binary Search

WX20200617-121745@2x.png (165.24 KB, 下载次数: 0)

WX20200617-121745@2x.png

评分

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

查看全部评分

回复

使用道具 举报

🔗
Heloise0524 2020-6-18 00:03:05 | 只看该作者
全局:
坚持14天,刷了3题
笔记
1. UNION of two queries is faster than one OR query
2. Brute force: We need a new array, a counter as index of new array, and do two for loops for even and odd numbers
3. Need to check start and end separately to decrement or increment them; 因为还包括之前没有用for loop的情况,也就是不需要swap,可能两者都是even或者💰even后odd
4. Any number XOR'd with itself is zero. Any number XOR'd with zero is the number itself.

Screen Shot 2020-06-17 at 9.02.44 AM.png (99.88 KB, 下载次数: 0)

Screen Shot 2020-06-17 at 9.02.44 AM.png

评分

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

查看全部评分

回复

使用道具 举报

🔗
xtray 2020-6-17 23:36:33 | 只看该作者
全局:
Day 7, 3道题



3. 无重复字符的最长子串
   滑动窗口求解, start , end双指针

41. 缺失的第一个正数
   让每一个数字回到它本来的位置, 比如4应该放在3, 然后遍历寻找缺失的

88. 合并两个有序数组
    从后往前合并, 如果第二个数组还有多余的,复制到第一个数组
回复

使用道具 举报

🔗
wdk2000 2020-6-17 23:03:36 | 只看该作者
全局:
day 8 6题
1. 去重-group by


评分

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

查看全部评分

回复

使用道具 举报

全局:
06.16. 刷题第五天打卡第五天

1. compress String(二刷)
觉得之前掌握的不牢固,所以今天再次刷题,然后看看之前遗漏的点是不是都已经捡了起来,
之前感觉也做过一些题目了,但是仍然未能得法,根本原因就是总结和复习不够到位;
因此今后也会拿一些老题过来再review,总结再提高

本题需要注意的点:
a. 注意到如果是unique的character, 那么就单独处理1(使用fast slow begin来处理)
b. 如果是多个,甚至是两位数及以上多个,就再单独处理2(get length);
c. 然后就create new char;从后向前处理(注意用到Character.isDigit)

2. Decompress String
这个题目相对来说可能没有题1那么直观,需要注意的是:
也是分情况[0,2] & (2, 9]来进行讨论
同样要建立一个new Char,然后从后往前依次填入重复的元素(character)
要注意做循环的时候,是递增2/递减2的gap向前移动;

3. All anagram
使用HashMap对Base String 拿值和对应出现的次数;
通过引入match这样一个int variable来对照hashmap当中的size,来决定是不是能够把初始index倒进去;
注意:在处理index的时候,要小心“-1”的操作可能需要发生(index is 0 based)

评分

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

查看全部评分

回复

使用道具 举报

🔗
lenash 2020-6-17 22:49:03 | 只看该作者
全局:
6/17 连续第4天打卡

做题7道

总结;
1. print debug不能忘
2. 数组问题不懂是否加1,举实例
3. 子数组子字符串要想到同向双指针

Screen Shot 2020-06-17 at 9.45.12 AM.png (64.56 KB, 下载次数: 0)

Screen Shot 2020-06-17 at 9.45.12 AM.png

评分

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

查看全部评分

回复

使用道具 举报

🔗
AprilCheng 2020-6-17 21:16:19 | 只看该作者
全局:
打卡第五天 6道题 = 3道2pointers 3道dp
11 Container With Most Water
- left, right → two pointers
- for each time, move the lower one to find a possibly larger area than the current one
41 Trapping Rain Water
1. use extra space: left max array and right max array → sum up the min values in each position
2. left, right → two pointers, left_max, right_max → the max height →
- when left height < right height: sum+=left max - left height
  - because left max is smaller than right max → move left pointers
- vice versa
125 Valid Palindrome
- s.isalnum() → if it's alphanumeric
- s.upper() → get the uppercased string
70 Climbing Stairs
- the total ways to reach the third step = the total ways to reach the first + the second
85 Maximal Rectangle
1. dp: array to store the left consecutive width to each position → iterate through array → in each iteration, search in the upper direction to find the max rectangle →TC=O(N^2M), SC=O(NM)
2. dp: one row array left, right, height
   - height as the vertical upwards height
   - left as the leftmost position between which and current position the height is larger than the current height
   - right as the rightmost position between which and current position the height is larger than the current height
   - pay attention to the iterations
198 House Robber
- dp -> maintain max money til current position
- pay attention to the cases of 0/1

评分

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

查看全部评分

回复

使用道具 举报

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

本版积分规则

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