Description Given two binary strings, return their sum (also a binary string). Description Description Given two binary strings, return their sum (als ...
分类:
编程语言 时间:
2018-07-16 12:22:54
阅读次数:
142
原题网址:https://www.lintcode.com/problem/lowest-common-ancestor-of-a-binary-tree/description 描述 给定一棵二叉树,找到两个节点的最近公共父节点(LCA)。 最近公共祖先是两个节点的公共的祖先节点且具有最大深度。 ...
分类:
其他好文 时间:
2018-07-15 22:18:37
阅读次数:
172
先写了一个最原始的方法1:(java没有切片很难受啊) 效率低的令人发指,不过想想也是,每次都要重新建立数组,肯定麻烦啊,于是优化,得到方法2: 效果好了一些,可依旧不在第一梯队。 怎么优化呢?查看大神思路发现,每次都要在inorder序列中搜索一遍,效率较低,可以建立一个Map存储inorder中 ...
分类:
编程语言 时间:
2018-07-15 19:34:26
阅读次数:
150
逻辑回归(Logistic Regression) 一、行业算法应用率 具统计,2017年,除了军事和安全领域,逻辑回归算法是在其它所有行业使用最多了一种机器学习算法; Logistic Regression(逻辑回归) Decision Trees(决策树) Random Forests(随机森林 ...
分类:
其他好文 时间:
2018-07-15 12:04:52
阅读次数:
231
这题比较简单,思路和之前做过的Merge Two Trees类似,都是对树的遍历进行简单运用,这里选择的递归的前序遍历。 ...
分类:
其他好文 时间:
2018-07-15 12:04:30
阅读次数:
170
Description 给出一个长度为 $n$ 的数组,求使得用最少数量的 $2^k$ 或 $ 2^k$ 的数,使得数组中的每一个元素都可以被你选出的 $2$ 的次幂表示 "题面" Solution 注意到两个性质: 1.一个数不会用两次,举个例子:用两个 $2$,不如用 $2,4$ 范围广 2.一 ...
分类:
其他好文 时间:
2018-07-14 22:18:09
阅读次数:
281
Description For the given binary tree, return a deep copy of it. Description Description For the given binary tree, return a deep copy of it. For the ...
分类:
编程语言 时间:
2018-07-14 14:42:00
阅读次数:
134
Description Count how many 1 in binary representation of a 32-bit integer. Description Description Count how many 1 in binary representation of a 32-b ...
分类:
编程语言 时间:
2018-07-14 11:56:03
阅读次数:
133
Given a binary tree, return all root-to-leaf paths. Note: A leaf is a node with no children. Example: 3.2) Recursive 4.. Test cases 1) empty 2) 1 3) ...
分类:
其他好文 时间:
2018-07-14 00:22:41
阅读次数:
149
Deep Joint Rain Detection and Removal from a Single Image[1] 简介:多任务全卷积从单张图片中去除雨迹。本文在现有的模型上,开发了一种多任务深度学习框架,学习了三个方面,包括二元雨条纹映射(binary rain streak map),雨条 ...
分类:
其他好文 时间:
2018-07-13 22:22:56
阅读次数:
235