原题地址:https://oj.leetcode.com/problems/validate-binary-search-tree/题意:检测一颗二叉树是否是二叉查找树。解题思路:看到二叉树我们首先想到需要进行递归来解决问题。这道题递归的比较巧妙。让我们来看下面一棵树:
...
分类:
编程语言 时间:
2014-05-26 10:48:19
阅读次数:
291
原题地址:https://oj.leetcode.com/problems/same-tree/题意:判断两棵树是否是同一棵树。解题思路:这题比较简单。用递归来做。首先判断两个根节点的值是否相同,如果相同,递归判断根的左右子树。代码:#
Definition for a binary tree n....
分类:
编程语言 时间:
2014-05-26 10:30:17
阅读次数:
289
原题地址:https://oj.leetcode.com/problems/symmetric-tree/题意:判断二叉树是否为对称的。Given
a binary tree, check whether it is a mirror of itself (ie, symmetric around ...
分类:
编程语言 时间:
2014-05-26 10:18:52
阅读次数:
293
网上找了一堆资料学习一下,了解这些,有助于规化程序结构,优化代码;使用gcc编译出来的程序,用size可以查看程序结构和大小,如
1: #size hello 2: Text data bss dec hex filename 3: 778 200 4 982 3D6 hello...
分类:
其他好文 时间:
2014-05-26 10:07:17
阅读次数:
289
I hate windows. 1. 下载安装 ImageMagick,
选择合适您电脑的版本,我下载的是:
ImageMagick-6.8.9-1-Q16-x86-dll.exehttp://www.imagemagick.org/script/binary-releases.php#window...
构建 XCache 的基本步骤 在开始之前,首先确保 PHP 正常安装并核实 phpize
是否位于 shell 的 PATH 下。同时,还需要一个 C 编译器,例如 GNU Compiler Collection (GCC),和一组包含 make 和
m4 的开发工具。在 Mac OS X 上,免...
分类:
其他好文 时间:
2014-05-26 08:47:10
阅读次数:
316
yum install gcc pcre-devel zlib-devel
openssl-develwget http://nginx.org/download/nginx-1.6.0.tar.gz./configure
--with-http_stub_status_module --with-...
分类:
其他好文 时间:
2014-05-26 07:58:20
阅读次数:
253
using System;using System.Collections.Generic;using
System.IO;using System.Linq;using
System.Runtime.Serialization.Formatters.Binary;using System.Text...
分类:
数据库 时间:
2014-05-26 06:18:47
阅读次数:
443
一、编译环境的准备 yum install gcc yum install gcc-c++ libstdc++-devel yum install zlib-devel二、源码包准备wget http://monkey.org/~provos/libevent-1.4.14b-stable.tar.gzwget http://memcached.googlecode.com/files/me...
分类:
系统相关 时间:
2014-05-26 03:38:01
阅读次数:
375
日期: 2014年5月23日
博客: 铁锚
最近在查看MariaDB主从复制服务器 Master 的错误日志时看到很多条警告信息,都是提示 UUID()函数不安全,可能 Slave 产生的值和 Master不一致, 警告信息大致如下:
140522 15:11:10 [Warning]
Unsafe statement written to the binary log
using sta...
分类:
数据库 时间:
2014-05-24 21:54:38
阅读次数:
600