1、求二叉树的深度 递归 int BitreeDepth(TreeNode *root){ if(root == NULL) return 0; else if(root->left == NULL && root->right == NULL) return 1; int DepthTl = Bi ...
分类:
其他好文 时间:
2016-09-28 02:03:12
阅读次数:
146
#include<stdio.h>int main(){ int i,j; for(i=1;i<10;i++) { for(j=1;j<10;j++) { printf("$"); } printf("\n"); } return 0;} $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ ...
分类:
其他好文 时间:
2016-09-28 02:02:23
阅读次数:
137
实验名称:实验一 实验1-1 代码: #include <stdio.h> Int main() { printf(“*********\n *******\n *****\n ***\n **\n *\n”); return 0; } 程序运行结果: 实验总结:注意换行。 实验1-2 实验要求:输 ...
分类:
其他好文 时间:
2016-09-28 01:43:09
阅读次数:
144
PHP教程PHP培训教程PHP栏目导航类兄弟连小编整理了多期的技术性文章,今天给大家分享一个实例functionbars($code,$title,$url){$path="";$msg="缺少必须参数..";if(empty($code)){return$msg;}if($url[0]=="*"){$cl=substr($url,1,strlen($url));}else{$cl="a01";//默认链接的c..
分类:
Web程序 时间:
2016-09-27 20:50:25
阅读次数:
206
PHP培训教程PHP栏目导航类functionbars($code,$title,$url){$path="";$msg="缺少必须参数..";if(empty($code)){return$msg;}if($url[0]=="*"){$cl=substr($url,1,strlen($url));}else{$cl="a01";//默认链接的class--为了修改颜色}$sql=$this->getsql("select*frompathwheres..
分类:
Web程序 时间:
2016-09-27 20:49:52
阅读次数:
192
#include<iostream> using namespace std; int main() { cout << "锄禾日当午,\n汗滴禾下土。"; return 0; } 还可以使用命令行将其输出到文本 int main() { system("\"C:\\Program Files (x ...
分类:
编程语言 时间:
2016-09-27 18:06:29
阅读次数:
324
在开发过程中很常用的会给等内联元素增加一个onlick事件,但是经常发生的一件事情就是点击的时候,选中了span中的字体;倒是不影响主逻辑,但是很难受,影响用户体验;解决方法很简单:给span或其他的元素加上这个属性就可以了;onselectstart="return false" ...
分类:
Web程序 时间:
2016-09-27 17:59:29
阅读次数:
175
计算两个日期对象间相隔天数 package cn.util; import java.util.Date; public class date { /** * 计算两个日期的相隔天数 * @param begin * @param end * @return */ public static lon ...
分类:
其他好文 时间:
2016-09-27 17:44:55
阅读次数:
112
题目: Reverse digits of an integer.Example1:x = 123, return 321Example2:x = -123, return -321 官方难度: Easy 翻译: 倒转整数。 例子: 输入123,返回321;输入-123,返回-321。 思路: 1. ...
分类:
其他好文 时间:
2016-09-27 15:10:01
阅读次数:
123
Given an array of n positive integers and a positive integer s, find the minimal length of a subarray of which the sum ≥ s. If there isn't one, return ...
分类:
其他好文 时间:
2016-09-27 14:49:55
阅读次数:
117