Given a sorted (in ascending order) integer array nums of n elements and a target value, write a function to search target in nums. If target exists, ...
分类:
其他好文 时间:
2018-11-10 10:53:38
阅读次数:
151
这个题是给树的前序和中序,输出后序。 做法是根据前序找根,根据根在中序中找中序的左右子树,根据左右子树长度找前序的左右子树,依此递归。 做过之后感觉还是比较基础的,废话不多说,上题上代码。 Bob will get a bag as gift from Alice, but Alice don't ...
分类:
其他好文 时间:
2018-11-09 23:25:25
阅读次数:
369
1.maven下载地址 官网 http://maven.apache.org/ ->download-> 四个版本 tar.gz 为linux系统,zip 为windows系统 binary为压缩版,source为源码版本 ->下载 binary zip版本的 2.下载后解压配置maven环境变量 ...
分类:
其他好文 时间:
2018-11-09 22:06:10
阅读次数:
268
【题目】 Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center). For example, this binary tree [1,2,2,3,4,4,3] is s ...
分类:
其他好文 时间:
2018-11-09 19:24:55
阅读次数:
155
utf8_general_ci 不区分大小写,这个你在注册用户名和邮箱的时候就要使用。utf8_general_cs 区分大小写,如果用户名和邮箱用这个 就会照成不良后果utf8_bin: compare strings by the binary value of each character i ...
分类:
数据库 时间:
2018-11-09 14:22:25
阅读次数:
308
ImportError: No module named dis3 解决办法如下 ...
分类:
其他好文 时间:
2018-11-08 20:44:05
阅读次数:
167
We are given a binary tree (with root node root), a target node, and an integer value K. Return a list of the values of all nodes that have a distance ...
分类:
其他好文 时间:
2018-11-08 18:31:16
阅读次数:
232
https://leetcode.com/problems/leaf-similar-trees/discuss/152358/Simple-6-lines-Java-StringBuilder-+-traverse-with-explanation Consider all the leaves ... ...
分类:
其他好文 时间:
2018-11-08 18:30:29
阅读次数:
148
Given the root node of a binary search tree (BST) and a value to be inserted into the tree, insert the value into the BST. Return the root node of the... ...
分类:
其他好文 时间:
2018-11-08 18:09:49
阅读次数:
127
虽然叫做“回归”,但是这个算法是用来解决分类问题的。回归与分类的区别在于:回归所预测的目标量的取值是连续的(例如房屋的价格);而分类所预测的目标变量的取值是离散的(例如判断邮件是否为垃圾邮件)。当然,为了便于理解,我们从二值分类(binary classification)开始,在这类分类问题中,y ...
分类:
其他好文 时间:
2018-11-07 15:28:24
阅读次数:
175