定义: 二分法检索的基本思想是设字典中的元素从小到大有序地存放在数组(array)中。首先将给定值key与字典中间位置上元素的关键码(key)比较,如果相等,则检索成功;否则,若key小,则在字典前半部分中继续进行二分法检索;若key大,则在字典后半部分中继续进行二分法检索。这样,经过一次比较就缩小 ...
分类:
其他好文 时间:
2018-11-28 17:37:37
阅读次数:
162
problem 111. Minimum Depth of Binary Tree 参考 1. Minimum Depth of Binary Tree; 完 111. Minimum Depth of Binary Tree 1. Minimum Depth of Binary Tree; 完 1 ...
分类:
其他好文 时间:
2018-11-28 12:07:27
阅读次数:
218
外网访问本地MariaDB数据库 本地安装了MariaDB数据库,只能在局域网内访问,怎样从公网也能访问内网MariaDB数据库? 本文将介绍具体的实现步骤。 1. 准备工作 1.1 安装并启动MariaDB数据库 默认安装的MariaDB数据库端口是 3306 。 2. 实现步骤 2.1 下载并解 ...
分类:
数据库 时间:
2018-11-27 14:45:26
阅读次数:
231
Given a binary tree, determine if it is height-balanced. For this problem, a height-balanced binary tree is defined as: a binary tree in which the dep ...
分类:
其他好文 时间:
2018-11-27 13:42:22
阅读次数:
140
/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NULL), r... ...
分类:
其他好文 时间:
2018-11-27 10:10:15
阅读次数:
199
problem Maximum Depth of Binary Tree 参考 1.Maximum Depth of Binary Tree; 完 ...
分类:
其他好文 时间:
2018-11-26 13:48:05
阅读次数:
197
文件种类 普通文件(ls -al出来第一列为-) 纯文本文件(ASCII):linux系统中最多的一种文件类型,可以使用cat直接读取; 二进制文件(binary):linux下面的可执行文件; 数据格式文件(data):程序运行过程中可能会去读取的某些特定格式的文件,使用cat直接读取会出现乱码。 ...
分类:
系统相关 时间:
2018-11-26 02:26:25
阅读次数:
196
原文地址:http://docs.python-requests.org/en/latest/user/quickstart/#binary-response-content Make a Request Making a request with Requests is very simple. ...
分类:
编程语言 时间:
2018-11-26 02:06:02
阅读次数:
149
Trees on the level 题目链接: https://vjudge.net/problem/UVA-122 题目意思: 给你一些(,)让你建立一棵树,直到输入()结束建树,然后判断树是否完整,如果没有结点未赋值或者被赋值两次,就按层次遍历输出树,否则输出not complete 代码: ...
分类:
其他好文 时间:
2018-11-26 00:08:26
阅读次数:
226
Given a binary search tree with non-negative values, find the minimum absolute difference between values of any two nodes. Example: Note: There are at ...
分类:
编程语言 时间:
2018-11-25 17:47:34
阅读次数:
163