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

[第五期活动] 在职刷题打卡,目标工作日一天2题,周末一天5题

🔗
xcy1994 2019-11-18 16:05:21 | 只看该作者
全局:
day4 2019/11/17
准备oracle 面经
20. ValidParentheses
938. RangeSumofBST
758. BikdWordsinString
622. DesignCircularQueue
353.DesignSnakeGame
145. postorder
144. preorder
94. inorder
回复

使用道具 举报

🔗
 楼主| xsijg8 2019-11-18 15:51:27 | 只看该作者
全局:
day 10
今天5题
Multiply Strings
Insert Delete GetRandom O(1) - Duplicates allowed
Group Anagrams
Valid Anagram
Fibonacci Number
回复

使用道具 举报

🔗
vlieng 2019-11-18 12:38:36 | 只看该作者
全局:
本帖最后由 vlieng 于 2019-11-18 12:40 编辑

11.17,2019 [Day2]
8: String to Integer
12: Integer to Roman
13: Roman to Integer
146: LRU Cache
215: Kth largest element in an array

回复

使用道具 举报

🔗
kdj842969 2019-11-18 11:08:31 | 只看该作者
全局:
[19/11/17][Day 3] 1题

Topic: Array
189. Rotate Array

对于递归和循环的边界还是有点不清楚,希望多刷题能够掌握好的方法

补充内容 (2019-11-22 12:37):
更正日期:19/11/19
回复

使用道具 举报

🔗
maljean 2019-11-18 10:40:56 | 只看该作者
全局:
day 12
122. Best Time to Buy and Sell Stock II
123. Best Time to Buy and Sell Stock III
309. Best Time to Buy and Sell Stock with Cooldown
740. Delete and Earn
790. Domino and Tromino Tiling
回复

使用道具 举报

🔗
jamesyu608 2019-11-17 23:48:24 | 只看该作者
全局:
[Day 16][Total Day 28] 2019/11/17,Topic:Stack and Heap(Lintcode)
- 149. Best Time to Buy and Sell Stock
- 151. Best Time to Buy and Sell Stock III
- 364. Trapping Rain Water II
- 122. Largest Rectangle in Histogram
回复

使用道具 举报

🔗
xcy1994 2019-11-17 16:59:25 | 只看该作者
全局:
day 3
完成了 contest 3题
1152.Analyze User Website Visit Pattern   
1153.String Transforms Into Another String
1154.Day of the Year   
回复

使用道具 举报

🔗
 楼主| xsijg8 2019-11-17 15:40:37 | 只看该作者
全局:
day 9
今天复习6题,全是这周面试被问过的
Spiral Matrix
Add Two Numbers II
Compare Version Numbers
Binary Tree Vertical Order Traversal
Binary Tree Zigzag Level Order Traversal
Compare Version Numbers
回复

使用道具 举报

🔗
家琦啊家琦 2019-11-17 15:15:16 | 只看该作者
全局:
11/16 【5题】

527. Word Abbreviation
1.用help function wordAbb(string word, int round);Trick:当round + 2 >= word.length() 的时候, 就不用abbr, 因为     god.length() == g1d.length(),所以要return 原来的word
2.help function, 在abbr的时候, 注意substring的index ,left: inclusive right: exclusive
3.先把原来的list abbr一遍放到hashmap 里面, 然后用while(true) 来loop, 因为可以走很多轮, 所以引进isUnique, 直到map 里面所有key的value 都是1的时候, if(unique)来break;
记得 while(true) loop 里面, 每一个大循环(新一轮), 要round ++,


242. Valid Anagram
1.基础hashtable 应用
2.在处理字符的时候, 可以将array的大小限制到26位, 用 arr[s.charAt(i) - ‘a’] 就可以实现。
3. 在最后check array 每个位置的值是不是0 就可以判定是不是anagram了。





438. Find All Anagrams in a String
1.Sliding window
2.map一开始记录了p里的各字符统计数,注意是按负数来统计的。
之后一直滑动统计当前substring的字符统计数,按正数统计加到map上。
只有遇到真命天子的anagram,字符统计数是一样的,才能和最开始的负数抵消,从而map.size()==0。此时加入合格下标到返回的answer里。


288. Unique Word Abbreviation
1.坑题, 特点对于unique的word, 把它和它的abbr 放到两个hashmap里面, 当你比较两个map中key相对应的value 时, 如果value 一样, 那就是unique, 否则就不是;

ex:








128. Longest Consecutive Sequence

1.用hashset 来存这些value;
2.在set里面, check 这个number 是不是存在, 用L  = i - 1 和 R = L + 1 两个while loop 查看连续的值是不是也在set 里面,  最后return 最大的 r - l - 1 , 因为l 和 r 都会increase 到 不能进while loop 的vaule; 假设最长是4和5, 所以答案应该是2; reason:   3,4,5,6  -> 6 - 3 - 1 = 2
3.剪枝: 在check的时候, 如果set.contains(key) -> set.remove(key), 节省时间
回复

使用道具 举报

🔗
iBatis 2019-11-17 15:07:09 | 只看该作者
全局:
day 3:
98. Validate Binary Search Tree
617. Merge Two Binary Trees

day 4:
173. Binary Search Tree Iterator
96. Unique Binary Search Trees
252. Meeting Rooms
253. Meeting Rooms II
427. Construct Quad Tree
332. Reconstruct Itinerary
529. Minesweeper
回复

使用道具 举报

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

本版积分规则

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