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

刷题记录帖

🔗
 楼主| Oceanid77 2019-11-17 12:53:57 | 只看该作者
全局:
周五太忙了
回复

使用道具 举报

🔗
 楼主| Oceanid77 2019-11-17 14:27:38 | 只看该作者
全局:
本帖最后由 Oceanid77 于 2019-11-17 14:29 编辑

541. Reverse String II
1260. Shift 2D Grid
similar question.

303. Range Sum Query - Immutable
some thing to pay attention here.


62. Unique Paths
follow up: what if you have to pass a point? count the number.
what if you have to pass a line.
tsp trverse man problem
307. Range Sum Query - Mutable

boolean to record the status of the one
[true false, true, false]

bit manipulate

binary index tree


suan fa jing sai rumenjingdian
https://github.com/dzsky/f***sky ... 7%89%88%EF%BC%89%20(%E7%AE%97%E6%B3%95%E8%89%BA%E6%9C%AF%E4%B8%8E%E4%BF%A1%E6%81%AF%E5%AD%A6%E7%AB%9E%E8%B5%9B).pdf
contest
three of them






回复

使用道具 举报

🔗
 楼主| Oceanid77 2019-11-19 02:05:41 | 只看该作者
本楼:
全局:
周日休息
回复

使用道具 举报

🔗
 楼主| Oceanid77 2019-11-19 14:11:45 | 只看该作者
回复

使用道具 举报

🔗
 楼主| Oceanid77 2019-11-19 14:53:03 | 只看该作者
回复

使用道具 举报

🔗
 楼主| Oceanid77 2019-11-20 15:27:45 | 只看该作者
全局:
100. Same Tree
use iterative
https://www.w3schools.com/java/java_break.asp
https://www.freecodecamp.org/new ... mmies-5e048933b82b/
https://interviewing.io/?urc=DMCa
--!!hashmap的实现原理
Computer Science 101

cracking the coding interview
princeton data structure
hashcode basic

code style guide
https://google.github.io/styleguide/javaguide.html

How big is the size of the input?
How big is the range of values?
What kind of values are there? Are there negative numbers? Floating points? Will there be empty inputs?
Are there duplicates within the input?
What are some extreme cases of the input?
How is the input stored? If you are given a dictionary of words, is it a list of strings or a trie?

This is usually the hardest part of the interview. In general, look for repeated work and try to optimize them by potentially caching the calculated result somewhere. Reference it later, rather than computing it all over again. I provide some tips on tackling topic-specific questions in detail below.
回复

使用道具 举报

🔗
 楼主| Oceanid77 2019-11-20 15:29:14 | 只看该作者
全局:
How to write test plan?
what is testable code?
what resource i can find for learn testing.
回复

使用道具 举报

🔗
 楼主| Oceanid77 2019-11-22 03:22:35 | 只看该作者
全局:
20. Valid Parentheses
Stack:
possible corner case:
when use pop(), there might be a chance that stack is empty.
22. Generate Parentheses
brute force

def generateParenthesis(self, N):
    if N == 0: return ['']
    ans = []
    for c in xrange(N):
        for left in self.generateParenthesis(c):
            for right in self.generateParenthesis(N-1-c):
                ans.append('({}){}'.format(left, right))
    return ans

这是什么?

Approach 2: Backtracking
good!
How to analyse time complexity?

study more.
hao ti.
Approach 3: Closure Number
https://leetcode.com/problems/ge ... An-iterative-method

94. Binary Tree Inorder Traversal
144. Binary Tree Preorder Traversal
145. Binary Tree Postorder Traversal
102. Binary Tree Level Order Traversal
100. Same Tree
how can you control the number pop out in queue when do travel order traversal?


The operation of ArrayList:
102. Binary Tree Level Order Traversal
Iterative way.
https://www.geeksforgeeks.org/linked-list-in-java/
回复

使用道具 举报

🔗
 楼主| Oceanid77 2019-11-22 03:23:32 | 只看该作者
全局:
20. Valid Parentheses
Stack:
possible corner case:
when use pop(), there might be a chance that stack is empty.

22. Generate Parentheses
brute force

def generateParenthesis(self, N):
    if N == 0: return ['']
    ans = []
    for c in xrange(N):
        for left in self.generateParenthesis(c):
            for right in self.generateParenthesis(N-1-c):
                ans.append('({}){}'.format(left, right))
    return ans

这是什么?

Approach 2: Backtracking
good!
How to analyse time complexity?

study more.
hao ti.
Approach 3: Closure Number
https://leetcode.com/problems/ge ... An-iterative-method

回复

使用道具 举报

🔗
 楼主| Oceanid77 2019-11-22 03:23:58 | 只看该作者
全局:
本帖最后由 Oceanid77 于 2019-11-22 03:25 编辑

20. Valid Parentheses
Stack:
possible corner case:
when use pop(), there might be a chance that stack is empty.

22. Generate Parentheses
brute force

这是什么?

Approach 2: Backtracking
good!
How to analyse time complexity?

study more.
hao ti.
Approach 3: Closure Number
https://leetcode.com/problems/ge ... An-iterative-method


94. Binary Tree Inorder Traversal
144. Binary Tree Preorder Traversal
145. Binary Tree Postorder Traversal
102. Binary Tree Level Order Traversal
100. Same Tree
how can you control the number pop out in queue when do travel order traversal?


The operation of ArrayList:
102. Binary Tree Level Order Traversal
Iterative way.
https://www.geeksforgeeks.org/linked-list-in-java/
回复

使用道具 举报

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

本版积分规则

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