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

组队复习算法+刷题

🔗
liunima063333 2019-8-11 00:43:21 | 只看该作者
全局:
打卡
leetcode 66
回复

使用道具 举报

🔗
chenghsu0224 2019-8-11 01:30:49 | 只看该作者
全局:
8.10打卡:
340. Longest Substring with At Most K Distinct Characters => Sliding Window: map<char, lastIdx>, when map.size() > k, remove char with min lastIdx
98. Validate Binary Search Tree => recursion: lower and upper bound
621. Task Scheduler => no. of intervals = no. of tasks + no. of idles (depends on task with max frequency)
125. Valid Palindrome => two pointers
158. Read N Characters Given Read4 II - Call multiple times => use pointers and temp buffer to record the reading pregress
133. Clone Graph => similar with copy list with random pointer but use recursion: map<original node, cloned node>
348. Design Tic-Tac-Toe => rows[], cols[], diagonal and anti-diagonal to check if a player wins
199. Binary Tree Right Side View => Recursion: maintain currDepth to check if any node is added at current level
回复

使用道具 举报

🔗
tracy82 2019-8-11 02:35:02 | 只看该作者
全局:
好厉害, 希望自己也开始努力
回复

使用道具 举报

🔗
Acker 2019-8-11 12:01:47 | 只看该作者
全局:
打卡
1. [457] Circular Array Loop (fast-slow pointers)
2. [464] Can I Win (Top-Down DP, memorization, 好几道游戏的题目都是这种思路 类似还有 1140-Stone Game II)
3. [467] Unique Substrings in Wraparound String (DP - 记录连续字符个数)
回复

使用道具 举报

🔗
jiangxiaoheng 2019-8-11 12:14:37 | 只看该作者
全局:
Day 3 打卡
9. Palindrome Number [Math] - easy
771. Jewels and Stones [HashSet] - easy
回复

使用道具 举报

🔗
kaka880213 2019-8-11 12:33:53 | 只看该作者
全局:
8/10
周六还要带娃出去玩,只刷一道250的题
250. Count Univalue Subtrees
回复

使用道具 举报

🔗
chenghsu0224 2019-8-12 00:30:29 | 只看该作者
全局:
8.11打卡:
314. Binary Tree Vertical Order Traversal => TreeMap + Queue BFS + column index
349. Intersection of Two Arrays => hashset
953. Verifying an Alien Dictionary => indices[26], comaring each two of consecutive words to find first difference
543. Diameter of Binary Tree => recursion get depth
173. Binary Search Tree Iterator => stack to simulate recursion
278. First Bad Version => binary search
680. Valid Palindrome II => (left, right-1) || (left+1, right)
157. Read N Characters Given Read4 => min(n - readPtr, currReadBytes)
回复

使用道具 举报

🔗
程序媛orZ 2019-8-12 12:57:08 | 只看该作者
全局:
打卡4:
Array:
4. Median of Two Sorted Arrays
String:
28        Implement strStr()       
14        Longest Common Prefix       
58        Length of Last Word
回复

使用道具 举报

🔗
kaka880213 2019-8-12 13:01:22 | 只看该作者
全局:
8/11
207.course-schedule.java --> Topology sort
回复

使用道具 举报

🔗
chenghsu0224 2019-8-13 02:06:13 | 只看该作者
全局:
本帖最后由 chenghsu0224 于 2019-8-13 02:10 编辑

8.12打卡:
896. Monotonic Array => two boolean flags to check whether increasing/decreasing
438. Find all Anagrams in a String => Sliding window + hashMap<char in pattern, freq of char> + counter to make sure window contains needed chars
211. Add and Search Word - Data structure design => Trie + DFS


回复

使用道具 举报

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

本版积分规则

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