这是亚麻的OA 题 这里的代码没有经过测试 Given a binary tree, find the subtree with maximum sum. Return the root of the subtree. another similar problem in leetcode : ht ...
分类:
其他好文 时间:
2018-01-16 18:24:59
阅读次数:
120
windows下开发用的xampp集成的环境,想装个php-redis扩展,扩展的github地址: https://github.com/nicolasff/phpredisphp_redis.dll下载地址:http://windows.php.net/downloads/pecl/snaps/ ...
Given two integers L and R, find the count of numbers in the range [L, R] (inclusive) having a prime number of set bits in their binary representation... ...
分类:
其他好文 时间:
2018-01-16 00:41:17
阅读次数:
179
Given two integers L and R, find the count of numbers in the range [L, R] (inclusive) having a prime number of set bits in their binary representation ...
分类:
其他好文 时间:
2018-01-15 17:36:27
阅读次数:
376
Linux中一切都是文件;目录说明:bin:binary的缩写,表示“二进制文件”,包含所有用户使用的执行程序boot:“启动”,包含与Linux启动密切相关的文件dev:device,“设备”包含外部设备etc:and so on“等等”包含系统的配置文件home:用户的私人目录lib:library,“库”,包含被调用的库文件media:“媒体”,通过media访问外设(USB,SD卡,DVD
分类:
系统相关 时间:
2018-01-15 17:35:53
阅读次数:
210
Given an integer array with no duplicates. A maximum tree building on this array is defined as follow: Construct the maximum tree by the given array a ...
分类:
其他好文 时间:
2018-01-15 12:32:41
阅读次数:
155
思路:动态规划。注意1024*1024>10^6,所以质素范围是(0,23)。 ...
分类:
其他好文 时间:
2018-01-15 00:30:50
阅读次数:
118
二叉树 / Binary Tree 二叉树是树结构的一种,但二叉树的每一个节点都最多只能有两个子节点。 对于二叉树的遍历,主要有以下三种基本遍历方式: 下面将用代码构建一个二叉树,并实现三种遍历方式, 完整代码 1 class TreeNode: 2 def __init__(self, val=N ...
分类:
编程语言 时间:
2018-01-15 00:29:57
阅读次数:
185
基本思想: 说明:元素必须是有序的,如果是无序的则要先进行排序操作。 也称为是折半查找,属于有序查找算法。用给定值k先与中间结点的关键字比较,中间结点把线形表分成两个子表,若相等则查找成功;若不相等,再根据k与该中间结点关键字的比较结果确定下一步查找哪个子表,这样递归进行,直到查找到或查找结束发现表 ...
分类:
其他好文 时间:
2018-01-14 18:38:16
阅读次数:
150
1. 问题描述 LeetCode第226题,题目名称为二叉树翻转 triv·i·a : details, considerations, or pieces of information of little importance or value. 翻译为细节,无用的细节 2. 思考 2.1 这类传 ...
分类:
编程语言 时间:
2018-01-14 13:48:08
阅读次数:
108