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

刷题记录帖

🔗
 楼主| Oceanid77 2019-12-4 12:08:52 | 只看该作者
全局:
133. Clone Graph
// Definition for a Node.
class Node {
    public int val;
    public List<Node> neighbors;

    public Node() {}

    public Node(int _val,List<Node> _neighbors) {
        val = _val;
        neighbors = _neighbors;
    }
};

494. Target Sum
DP
HUAHUA
22. Generate Parentheses
104. Maximum Depth of Binary Tree
257. Binary Tree Paths
回复

使用道具 举报

🔗
 楼主| Oceanid77 2019-12-4 15:32:44 | 只看该作者
全局:
plan study heap tmr


ArrayList:
118. Pascal's Triangle


205. Isomorphic Strings
study the trick tmr

567. Permutation in String
study

https://www.geeksforgeeks.org/list-interface-java-examples/


补充内容 (2019-12-8 14:58):
https://www.geeksforgeeks.org/linkedlist-addfirst-method-in-java/
回复

使用道具 举报

🔗
 楼主| Oceanid77 2019-12-6 09:20:04 | 只看该作者
全局:
backpackproblem
322. Coin Change
377. Combination Sum IV
494. Target Sum
139. Word Break

project management
key point
回复

使用道具 举报

🔗
 楼主| Oceanid77 2019-12-7 03:29:20 | 只看该作者
全局:
733. Flood Fill
01 Matrix
542. 01 Matrix

binarytree

116. Populating Next Right Pointers in Each Node
1110. Delete Nodes And Return Forest
回复

使用道具 举报

🔗
 楼主| Oceanid77 2019-12-8 03:30:17 | 只看该作者
全局:
heap
347. Top K Frequent Elements
973. K Closest Points to Origin

BST

98. Validate Binary Search Tree
回复

使用道具 举报

🔗
 楼主| Oceanid77 2019-12-8 12:25:40 | 只看该作者
全局:
98. Validate Binary Search Tree
done difference bwtween int and integer
public boolean helper(TreeNode root, Integer lower, Integer upper)
In Java, int is a primitive data type while Integer is a Wrapper class.

int, being a primitive data type has got less flexibility. We can only store the binary value of an integer in it.
Since Integer is a wrapper class for int data type, it gives us more flexibility in storing, converting and manipulating an int data.
Integer is a class and thus it can call various in-built methods defined in the class. Variables of type Integer store references to Integer objects, just as with any other reference (object) type.

We can’t assign a String value (containing an integer only) to an int variable directly or even by casting. However, we can assign a String to an object of Integer type using the Integer(String) constructor. We can even use parseInt(String) to convert a String literal to an int value.

int b = Integer.parseInt("123");


https://www.geeksforgeeks.org/linked-list-in-java/


recursion convert to iterative
98. Validate Binary Search Tree

code 有哪些可以优化的思路?

命名

285. Inorder Successor in BST
iterative recursive not fully understand

173. Binary Search Tree Iterator
回复

使用道具 举报

🔗
 楼主| Oceanid77 2019-12-8 12:46:13 | 只看该作者
全局:
回复

使用道具 举报

🔗
 楼主| Oceanid77 2019-12-11 03:55:29 | 只看该作者
全局:
173. Binary Search Tree Iterator
701. Insert into a Binary Search Tree
iterative way ?
there is problem here


test case for BST
duplicate
equal
450. Delete Node in a BST
回复

使用道具 举报

🔗
 楼主| Oceanid77 2019-12-12 02:15:44 | 只看该作者
全局:
450. Delete Node in a BST
practice run test case in head.

two mistake:
root = curr
root.right != null ans root.left == null/ how to write condition?
703. Kth Largest Element in a Stream
two ways: min heap and use insert and find
215. Kth Largest Element in an Array

236. Lowest Common Ancestor of a Binary Tree
235. Lowest Common Ancestor of a Binary Search Tree

219. Contains Duplicate II
try some other way
Approach #2 (Binary Search Tree)
Approach #3 (Hash Table)
217. Contains Duplicate
220. Contains Duplicate III


104. Maximum Depth of Binary Tree
110. Balanced Binary Tree
108. Convert Sorted Array to Binary Search Tree

总结花花视频里面我学到的东西
the usage of some key work:
super,abstract, static, final
how to debug the application

回复

使用道具 举报

🔗
 楼主| Oceanid77 2019-12-13 02:28:09 | 只看该作者
全局:

450. Delete Node in a BST
703. Kth Largest Element in a Stream
priorityQueue string type ?

test case
what if the k is larger than the queue.size()?
what is the value that is to be returned?

295. Find Median from Data Stream
heap


huahua
https://www.youtube.com/watch?v= ... mp;index=9&t=0s
变量的一生 Lifetime of a variable - CS 大讲堂 EP5
栈和堆?

花花酱 引用 Reference - CS大讲堂 EP6

how to solve pass by value?
use array.
22. Generate Parentheses
257. Binary Tree Paths
string builder?

Go through what I have done:
238Product of Array Except Self   
297Serialize and Deserialize Binary Tree   
11Container With Most Water   
240. Search a 2D Matrix II!!!study it.

sliding window:
735. Asteroid Collision
LinkedList


BFS/DFS
127. Word Ladder
200. Number of Islands
51. N-Queens
回复

使用道具 举报

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

本版积分规则

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