使用中序遍历,返回第k个数来处理 # Definition for a binary tree node. # class TreeNode: # def __init__(self, x): # self.val = x # self.left = None # self.right = None ...
分类:
其他好文 时间:
2020-04-24 01:02:36
阅读次数:
63
# Definition for a binary tree node. # class TreeNode: # def __init__(self, x): # self.val = x # self.left = None # self.right = None class Solution: ...
分类:
其他好文 时间:
2020-04-24 00:50:47
阅读次数:
60
# Definition for a binary tree node. # class TreeNode: # def __init__(self, x): # self.val = x # self.left = None # self.right = None class Solution: ...
分类:
其他好文 时间:
2020-04-23 12:09:43
阅读次数:
60
1.双指针 双指针解决数组,字符串,二分搜索,链表翻转、判断是否有环、寻找链表向后数第i个元素、链表中间的元素。 1.1有序数组两数之和 left = 0,right = arr.len 1 若arr[left]+arr[right] sum,right ;否则left++; 1.2最小子串(双指针 ...
分类:
其他好文 时间:
2020-04-22 22:52:53
阅读次数:
81
1.节点数据结构 public class Node { public int value; public Node left; public Node right; public Node(int data){ this.value = value; } } 2.递归 public class R ...
分类:
编程语言 时间:
2020-04-22 13:39:29
阅读次数:
66
左连接 ,右连接,内连接和全外连接的4者区别 答:left join (左连接):返回包括左表中的所有记录和右表中连接字段相等的记录。 right join (右连接):返回包括右表中的所有记录和左表中连接字段相等的记录。 inner join (等值连接或者叫内连接):只返回两个表中连接字段相等的 ...
分类:
其他好文 时间:
2020-04-22 10:23:58
阅读次数:
80
题目描述 Given an array nums, there is a sliding window of size k which is moving from the very left of the array to the very right. You can only see the ...
相对定位 定位有三种: 1.相对定位 2.绝对定位 3.固定定位 相对定位:相对于自己原来的位置定位 现象和使用: 1.如果对当前元素仅仅设置了相对定位,那么与标准流的盒子什么区别。 2.设置相对定位之后,我们才可以使用四个方向的属性: top、bottom、left、right 特性: 1.不脱标 ...
分类:
Web程序 时间:
2020-04-21 15:25:37
阅读次数:
82
.amap-logo { right: 0 !important; left: auto !important; display: none !important; } .amap-copyright { right: 70px !important; left: auto !important; ...
分类:
其他好文 时间:
2020-04-21 15:22:53
阅读次数:
194
Given a binary tree, return the level order traversal of its nodes' values. (ie, from left to right, level by level). For example:Given binary tree [3 ...
分类:
其他好文 时间:
2020-04-21 09:51:36
阅读次数:
66