Given a binary tree, check whether it is a
mirror of itself (ie, symmetric around its center).For example, this binary tree
is symmetric: 1 / \ 2 2 / ...
分类:
其他 时间:
2014-02-12 12:26:51
收藏:
0 评论:
0 赞:
0 阅读:
317
Given a linked list, determine if it has a
cycle in it.Follow up:Can you solve it without using extra space?/** *
Definition for singly-linked list. *...
分类:
其他 时间:
2014-02-12 12:30:11
收藏:
0 评论:
0 赞:
0 阅读:
342
1 public class Solution { 2 public TreeNode
buildTree(int[] preorder, int[] inorder) { 3 int len1 = preorder.length; 4 int
len2 = inorder.length; 5 if...
分类:
其他 时间:
2014-02-12 12:23:31
收藏:
0 评论:
0 赞:
0 阅读:
362
place holder
分类:
其他 时间:
2014-02-12 12:20:11
收藏:
0 评论:
0 赞:
0 阅读:
322
1 public class Solution { 2 public TreeNode
buildTree(int[] inorder, int[] postorder) { 3 int inEnd = inorder.length-1; 4
int postEnd = postorder.leng...
分类:
其他 时间:
2014-02-12 12:16:51
收藏:
0 评论:
0 赞:
0 阅读:
347
这题目是一道求解数独的题目。做了简单优化,也从网上找了不少数据测试都OK,然后提交就TLE。最后看了下DISCUSS。发现说倒着搜能过,正着搜超时。然后我只是把i=1;i=1;--i。。。。过了。。。我的代码进行了优化,剔除了一定不会出现在该位置的值。所以略长,不过很好理解。大家请欣赏!
1 #in...
分类:
其他 时间:
2014-02-12 12:10:11
收藏:
0 评论:
0 赞:
0 阅读:
392
1 public class Solution { 2 public String
countAndSay(int n) { 3 String res = "1"; 4 if(n==0) return res; 5 for(int
i=1;i1){22 temp = temp+count+last;...
分类:
其他 时间:
2014-02-12 12:06:51
收藏:
0 评论:
0 赞:
0 阅读:
336
Given an array withnobjects colored red, white
or blue, sort them so that objects of the same color are adjacent, with the
colors in the order red, wh...
分类:
其他 时间:
2014-02-12 12:03:31
收藏:
0 评论:
0 赞:
0 阅读:
354
Switching between installed Java versions can
be accomplished using the update alternatives command.To get a list of your
installed Java platforms, ru...
分类:
其他 时间:
2014-02-12 12:00:11
收藏:
0 评论:
0 赞:
0 阅读:
402
接着昨天的工作。上面说要重定向java.util.logging.Logger的输出,
发现也不是不可能。package jmx;import java.util.logging.FileHandler;import
java.util.logging.Filter;import java.util...
分类:
其他 时间:
2014-02-12 11:56:51
收藏:
0 评论:
0 赞:
0 阅读:
313
开了个小号去做div2写一下解题报告。Problem AInna and Alarm
Clock简单题。直接开数组标记一下即可。代码如下: 1 /**************************************************
2 * Author : xiaohao Z 3 *...
分类:
其他 时间:
2014-02-12 11:50:11
收藏:
0 评论:
0 赞:
0 阅读:
423
1 /* 2 Name:for循环例子1、2、3 3 Copyright: By.不懂网络 4
Author: Yangbin 5 Date:2014年2月12日 02:12:41 6
Description:该代码用来熟悉for语句的流程思路,分3个例子解释for语句的循环流程。 7 */ 8 #...
分类:
其他 时间:
2014-02-12 11:46:51
收藏:
0 评论:
0 赞:
0 阅读:
1257
1 /* 2 Name:求1-100之间所有能被3整除的数字之和 3 Copyright:
By.不懂网络 4 Author: Yangbin 5 Date:2014年2月12日 02:37:42 6
Description:用注释中的思路去解析这个例子应该怎样去做。 7 */ 8 # includ...
分类:
其他 时间:
2014-02-12 11:43:31
收藏:
0 评论:
0 赞:
0 阅读:
528
软件开发工具是软件开发过程中必不可少的,因此小编整理了14款常用的开发工具,希望能令你在编程过程中更加游刃有余,如虎添翼。SharpDevelopSharpDevelop是一款可用于替代微软Visual
Studio的操作系统。几分钟内便可安装和使用它。SharpDevelop读取项目时采用与原来相...
分类:
其他 时间:
2014-02-12 11:40:11
收藏:
0 评论:
0 赞:
0 阅读:
333
本文章节:1.JMM简介2.堆和栈3.本机内存4.防止内存泄漏1.JMM简介 i.内存模型概述
Java平台自动集成了线程以及多处理器技术,这种集成程度比Java以前诞生的计算机语言要厉害很多,该语言针对多种异构平台的平台独立性而使用的多线程技术支持也是具有开拓性的一面,有时候在开发Java同步和线...
分类:
其他 时间:
2014-02-12 11:36:51
收藏:
0 评论:
0 赞:
0 阅读:
356
活跃了将近三年的 JSR 133,近期发布了关于如何修复 Java 内存模型(Java
Memory Model, JMM)的公开建议。原始 JMM 中有几个严重缺陷,这导致了一些难度高得惊人的概念语义,这些概念原来被认为很简单,如
volatile、final 以及 synchronized。在这...
分类:
其他 时间:
2014-02-12 11:33:31
收藏:
0 评论:
0 赞:
0 阅读:
350
Given an array withnobjects colored red, white
or blue, sort them so that objects of the same color are adjacent, with the
colors in the order red, wh...
分类:
其他 时间:
2014-02-12 11:30:11
收藏:
0 评论:
0 赞:
0 阅读:
375
Linux Shell编程入门从程序员的角度来看,
Shell本身是一种用C语言编写的程序,从用户的角度来看,Shell是用户与Linux操作系统沟通的桥梁。用户既可以输入命令执行,又可以利用
Shell脚本编程,完成更加复杂的操作。在Linux GUI日益完善的今天,在系统管理等领域,Shell编...
分类:
其他 时间:
2014-02-12 11:23:31
收藏:
0 评论:
0 赞:
0 阅读:
403
jmx链接的时候,最简单的例子都行不通,郁闷,出现了:参考:http://reiz6153.blog.163.com/blog/static/401089152009442723208/代码:MBeanServer
mbs = MBeanServerFactory.createMBeanServer...
分类:
其他 时间:
2014-02-12 11:26:51
收藏:
0 评论:
0 赞:
0 阅读:
755
1 #include 2 #include 3 #include 4 #include 5
#include 6 #define maxx 100002 7 using namespace std; 8 int
a[20022],c[100022],x[100022],n,zuo[100022],y...
分类:
其他 时间:
2014-02-12 11:16:51
收藏:
0 评论:
0 赞:
0 阅读:
324