1 二进制IO(Binary IO)在前一篇我们了解了逐字符读写和逐行读写函数。如果我们在读写二进制文件,希望以此读写整个文件内容,这两个函数虽然可以实现,但是明显会很麻烦且多次循环明显效率很低。为了应对这种场景,标准IO库提供了fread和fwrite函数。函数声明:#include size_t...
分类:
其他好文 时间:
2015-03-02 18:42:40
阅读次数:
183
leetcode 104.Maximum Depth of Binary Tree
分类:
其他好文 时间:
2015-03-02 18:31:30
阅读次数:
114
题目1.same treeGiven two binary trees, write a function to check if they are equal or not.Two binary trees are considered equal if they are structurally identical and the nodes have the same value.2.sym...
分类:
其他好文 时间:
2015-03-02 16:51:53
阅读次数:
135
Suppose that all the keys in a binary tree are distinct positive integers. Given the postorder and inorder traversal sequences, you are supposed to output the level order traversal sequence of the cor...
分类:
其他好文 时间:
2015-03-02 13:16:06
阅读次数:
112
1 二进制IO(Binary IO)在前一篇我们了解了逐字符读写和逐行读写函数。如果我们在读写二进制文件,希望以此读写整个文件内容,这两个函数虽然可以实现,但是明显会很麻烦且多次循环明显效率很低。为了应对这种场景,标准IO库提供了fread和fwrite函数。函数声明:#include size_t...
分类:
其他好文 时间:
2015-03-02 10:57:00
阅读次数:
220
Tree
时间限制:1000 ms | 内存限制:65535 KB
难度:3
描述Little Valentine liked playing with binary trees very much. Her favorite game was constructing randomly looking binary trees with
capital lett...
分类:
其他好文 时间:
2015-03-01 15:48:19
阅读次数:
172
STL包含四种不同的二分查找算法,binary_search lower_bound upper_bound equal_range.他们的作用域是已经排序好的的数组。
★binary_search试图在已排序的[first, last)中寻找元素value。如果找到它会返回true,否则返回false,它不返回查找位置。
★iterator
lower_boun...
分类:
其他好文 时间:
2015-03-01 12:01:11
阅读次数:
178
https://oj.leetcode.com/problems/path-sum-ii/Given a binary tree and a sum, find all root-to-leaf paths where each path's sum equals the given sum.For...
分类:
其他好文 时间:
2015-02-28 16:14:26
阅读次数:
155
1.在官网获取mariaDB的安装包2.展开MariaDB文件tarxfmariadb-5.5.42-linux-x86_64.tar.gz-C/usr/local
3.帮助文档位置
/usr/local/mariadb-5.5.42-linux-x86_64/INSTALL-BINARY
4.为数据库数据准备硬盘
fdisk/dev/sdbpvcreate/dev/sdb1vgcreatemysqlvg/dev/sdb1lvcreate-l1..
分类:
数据库 时间:
2015-02-28 11:34:31
阅读次数:
260
https://oj.leetcode.com/problems/validate-binary-search-tree/Given a binary tree, determine if it is a valid binary search tree (BST).Assume a BST is ...
分类:
其他好文 时间:
2015-02-27 21:24:37
阅读次数:
143