¶þ²æÊ÷ (Binary Tree) µÄ»ù±¾²Ù×÷ (Java)
package algorithm.binarytree;
import java.util.Arrays;
import java.util.Stack;
import util.ArrayUtil;
import util.OutputUtil;
public class BinTree {
private BinNode root = null;
public BinTree()
{
}
public BinTree(int data[])
{
if(data == null || data.length == 0)
{
root = null;
return;
}
root = buildInOrder(data, 0, data.length - 1);
}
private BinNode buildInOrder(int data[], int start, int end)
{
if(start > end)
{
return null;
}
int mid = (start + end) >> 1;
BinNode lc = buildInOrder(data, start, mid - 1);
BinNode rc = buildInOrder(data, mid + 1, end);
return new BinNode(data[mid], lc, rc);
}
public BinNode getRoot() {
return root;
}
public void setRoot(BinNode root) {
this.root = root;
}
public void insert(BinNode parent, int value, boolean isLeft)
{
if(parent == null)
{
roo
Ïà¹ØÎĵµ£º
MonoRailÊǾµäµÄMVCģʽ,ËùÒÔÆäÖÐÒ²¾ßÓÐÈý¸öÔªËØModel,Controller,View,ÆäÖÐMonoRailÊÇͨ¹ýUrlµØÖ·À´½âÎö
ÏàÓ¦µÄ²Ù×÷µÄ,Èçµ±Äã·ÃÎÊ:/home/index.rail,¶ÔÓ¦»áÖ´ÐÐHomeControllerÀàÖеÄIndex·½·¨,¶øÇÒ¿ÉÒÔ×Ô¶¯°ó¶¨²ÎÊýºÍ
RequestµÄÊý¾Ý,Èç·ÃÎÊ:/home/index.rail?id=1,Äã¿ÉÒÔÔÚHomeControllerÀàÖеÄIndex·½·¨Öж¨ÒåÒ»¸ö²ÎÊý ......
µÚ¶þÖÖ¼òµ¥µÄ·½·¨¾ÍÊÇ,ÔÚhttp://proguard.sourceforge.net/ÏÂÔØZIP°ü.×îеÄÊÇ4.5BETA
½âѹËõºó,Ë«»÷proguardgui.jar
ÔËÐÐÈí¼þ
×îɵ¹ÏµÄÉèÖ÷½·¨:ÉèÖúÃINPUT/OUTPUT,µãPROCESS.½á¹û¾Í³öÀ´ÁË.
Éú³ÉÁË.a.class.b.class ÓÃJAD·´±àÒë,JADÌáʾ:²»ÄÜÍêÕûµÄ·´±àÒë....,´ò¿ª±àÒëºóµÄ´úÂë±äÁ¿ºÍº¯ÊýÃûÈ«²¿±»Ì ......
Java»ù´¡-ѧϰʹÓÃAnnotation×¢½â¶ÔÏó
×¢½â(Ò²±»³ÆÎªÔªÊý¾Ý)ΪÎÒÃÇÔÚ´úÂëÖÐÌí¼ÓÐÅÏ¢ÌṩÁËÒ»ÖÖÐÎʽ»¯µÄ·½·¨,ʹÎÒÃÇ¿ÉÒÔÔÚÉÔºóij
¸öʱ¿Ì·Ç³£·½±ãµØÊ¹ÓÃÕâЩÊý¾Ý
1-1:»ù±¾Óï·¨
Java SE5ÄÚÖÃÈýÖÖ±ê×¼×¢½â
@Override:±íʾµ±Ç°µÄ·½·¨¶¨Ò彫¸²¸Ç³¬ÀàÖеķ½·¨.Èç¹ûÄ㲻СÐÄÆ´Ð´´íÎó,»òÕß·½·¨Ç©Ãû¶Ô²»Éϱ»¸²
¸ÇµÄ·½·¨ ......
2006-01-18 13:53×÷Õߣº³ö´¦£º²©¿ÍÔ°ÔðÈα༣º·½ÖÛ http://dev.yesky.com/178/2278678.shtml ÒýÑÔ
JavaµÄ¶ÑÊÇÒ»¸öÔËÐÐʱÊý¾ÝÇø£¬ÀàµÄʵÀý(¶ÔÏó)´ÓÖзÖÅä¿Õ¼ä¡£JavaÐéÄâ»ú(JVM)µÄ¶ÑÖд¢´æ×ÅÕýÔÚÔËÐеÄÓ¦ÓóÌÐòËù½¨Á¢µÄËùÓжÔÏó£¬ÕâЩ¶ÔÏóͨ¹ýnew¡¢newarray¡¢anewarrayºÍmultianewarrayµÈÖ¸ÁÁ¢£¬µ«ÊÇËüÃDz»ÐèÒ ......
JDK 5.0 ÖÐÔö¼ÓµÄ·ºÐÍÀàÐÍ£¬ÊÇ Java ÓïÑÔÖÐÀàÐͰ²È«µÄÒ»´ÎÖØÒª¸Ä½ø¡£µ«ÊÇ£¬¶ÔÓÚ³õ´ÎʹÓ÷ºÐÍÀàÐ͵ÄÓû§À´Ëµ£¬·ºÐ͵ÄijЩ·½Ãæ¿´ÆðÀ´¿ÉÄܲ»ÈÝÒ×Ã÷°×£¬ÉõÖÁ·Ç³£Ææ¹Ö¡£ÔÚ±¾ÔµēJava ÀíÂÛºÍʵ¼ù”ÖУ¬Brian Goetz ·ÖÎöÁËÊø¸¿µÚÒ»´ÎʹÓ÷ºÐ͵ÄÓû§µÄ³£¼ûÏÝÚå¡£Äú¿ÉÒÔͨ¹ýÌÖÂÛÂÛ̳Óë×÷ÕßºÍÆäËû¶ÁÕß·ÖÏíÄú¶Ô±¾ÎĵĿ´·¨¡ ......