![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
leetcode
Penelope111
这个作者很懒,什么都没留下…
展开
-
7.1 leetcode 刷题记录(tree)938BST、94(medium)inorder traversal、102(medium)BFS
1.巩固关于binary search tree(BST,二叉搜索树)的相关知识。 每个node的值大于left subtree中所有nodes的值,小于right subtree中所有nodes的值。 leetcode 938.Range Sum of BST Given therootnode of a binary search tree, return the sum of v...原创 2019-07-01 20:33:53 · 124 阅读 · 0 评论 -
7.2 leetcode 刷题(BST)105(medium)、
105.Construct Binary Tree from Preorder and Inorder Traversal 递归算法注意index的变化!注意Conor case! class Solution { HashMap<Integer,Integer> map=new HashMap<>(); private TreeNode ...原创 2019-07-03 11:34:15 · 82 阅读 · 0 评论 -
7.3 leetcode 刷题记录(linkedlist) 21(easy)、104(easy)、2(medium)
21.Merge Two Sorted Lists Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists. class Solution { public ...原创 2019-07-03 16:23:27 · 87 阅读 · 0 评论