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

冬令时个人打卡贴

🔗
 楼主| snowymo 2020-11-17 17:21:42 | 只看该作者
全局:
Forgot to post yesterday

Day 32. Daily only. But I got my hardware and patent reading done

回复

使用道具 举报

🔗
 楼主| snowymo 2020-11-17 17:24:53 | 只看该作者
全局:
Day 33. Daily + high freq


845. Longest Mountain in Array

it is very clear that we only need to do one pass and just need to record if we are "climbing" or "going down" as well as record the max number

20. Valid Parentheses

Using stack

468. Validate IP Address

Be careful

39. Combination Sum

Cost me so long to find the correct way for backtracking. I think the diff btw DP and backtracking is that backtracking asks us to "just do it" and call self for next option.

22. Generate Parentheses

I am not sure if it will issue TLE when n is very large since I think there exists duplicate operations.
回复

使用道具 举报

🔗
 楼主| snowymo 2020-11-18 17:13:10 | 只看该作者
全局:
Day 34, Daily + high freq


Daily 858

Math

230

binary search tree + recursion

332

tree path: preorder+ inorder

105

I was doing it with backtracking idea. However, super slow.
I found one using multiset with stack that is decent and fast. But I am confused why such solution is working since I assume there exists backtracking?

417

I used to think it is like DP that fill all the cells.
However not. it is actually a DFS question.
回复

使用道具 举报

🔗
 楼主| snowymo 2020-11-19 14:41:24 | 只看该作者
全局:
Day 35 daily
回复

使用道具 举报

🔗
 楼主| snowymo 2020-11-20 14:40:13 | 只看该作者
全局:
Day 36. Daily. Need to work on a rebuttal

回复

使用道具 举报

🔗
 楼主| snowymo 2020-11-21 17:30:23 | 只看该作者
全局:
Day 37. Daily only.

82. Search in Rotate Sorted Array II

Find peak
Find the target
回复

使用道具 举报

🔗
fansian 2020-11-22 07:52:01 | 只看该作者
全局:
路过,高频题是不是绿色的就算高频?
回复

使用道具 举报

🔗
 楼主| snowymo 2020-11-26 15:01:09 | 只看该作者
全局:
Day 38


Day 39


Day 40


Day 41



回复

使用道具 举报

🔗
 楼主| snowymo 2020-11-26 15:05:34 | 只看该作者
全局:
Day 42 Daily + High Freq


Daily

keep finding until find one.
Since 11...11 = 11...1 * 10 + 1 so the mod result won't change when K is dividable by 2 or 5.

No.394 Decode String

Using stack. Like how we treat calculators

No.74 Search a 2D matrix

binary search x 2
I slightly change the mid in binary search so mid is a ceil result now

No.567 Permutation in string

sliding window. I think using constant vector will be way faster

No.127 Word Ladder

Mine is slow since I manually calculated the neighbours.
1) using * to save the effort for calculating neighbours
2) learn how to do a bidirectional way

No.442 Find all duplicates

Hash is the easiest way.
If we want to save space, we can use the item as the index, to do the "jump index" operation.
If it is jumped by other items, assign with -1
If it is a start item, assign with 0

337. House Robber III.PNG (14.58 KB, 下载次数: 10)

337. House Robber III.PNG
回复

使用道具 举报

🔗
 楼主| snowymo 2020-11-26 15:06:25 | 只看该作者
全局:
fansian 发表于 2020-11-22 07:52
路过,高频题是不是绿色的就算高频?

Not really. Someone shared the high freq questions from various companies in the bbs. Guess it is summarized if you have LeetCode membership.
回复

使用道具 举报

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

本版积分规则

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