×î´ó³Ë»ýµÄN 1ÏֻÓó˷¨²»ÄÜÓó˷¨ (Java)ʵÏÖ
package algorithm.misc;
import util.*;
public class MaxProductOfN1 {
private static int exceptIndex = -1;
public static long regMethod(int data[])
{
long ret = Long.MIN_VALUE;
long tmp = 1;
for(int i = 0; i < data.length; i++)
{
tmp = 1;
for(int j = 0; j < data.length; j++)
{
if(j != i)
{
tmp *= data[j];
}
}
if(tmp > ret)
{
ret = tmp;
exceptIndex = i;
}
}
return ret;
}
public static long dp(int data[])
{
long ascent[] = new long[data.length + 1];
ascent[0] = 1;
for(int i = 0; i < data.length; i++)
&nbs
Ïà¹ØÎĵµ£º
Javaѧϰ´ÓÈëÃŵ½¾«Í¨
Ò»¡¢ JDK (Java Development Kit)
JDKÊÇÕû¸öJavaµÄºËÐÄ£¬°üÀ¨ÁËJavaÔËÐл·¾³£¨Java Runtime Envirnment£©£¬Ò»¶ÑJava¹¤¾ßºÍJava»ù´¡µÄÀà¿â(rt.jar)¡£²»ÂÛʲôJavaÓ¦Ó÷þÎñÆ÷ʵÖʶ¼ÊÇÄÚÖÃÁËij¸ö°æ±¾µÄJDK¡£Òò´ËÕÆÎÕJDKÊÇѧºÃJavaµÄµÚÒ»²½¡£×îÖ÷Á÷µÄJ ......
Õª×Ô£ºjava JDK ʵÀý±¦µä
MD5¼´Message-Digest Algorithm 5£¨ÐÅÏ¢-ÕªÒªËã·¨ 5£©£¬ÓÃÓÚÈ·±£ÐÅÏ¢´«ÊäÍêÕûÒ»Ö¡£ÊǼÆËã»ú¹ã·ºÊ¹ÓõÄÔÓ´ÕËã·¨Ö®Ò»£¨ÓÖÒëÕªÒªËã·¨¡¢¹þÏ£Ëã·¨£©£¬Ö÷Á÷±à³ÌÓïÑÔÆÕ±éÒÑÓÐMD5ʵÏÖ¡£
¡¡¡¡ ½«Êý¾Ý£¨È纺×Ö£©ÔËËãΪÁíÒ»¹Ì¶¨³¤¶ÈÖµÊÇÔÓ´ÕËã·¨µÄ»ù´¡ÔÀ ......
0¡¢ ÐèÒª±êʶ·û
a) ²»ÔÚº¯ÊýÄÚ
1¡¢ ·Ç·¨±í´ïʽ¿ªÊ¼
b) ¿ÉÄÜ:¶ªÊ§À¨ºÅ .
2. no data found
a) ¿ÉÄÜ:setInt(1,100)ÖÐ,ûÓÐ100Õâ¸öÖµ
3. ÕÒ²»µ½·ûºÅ
a) ¿ÉÄÜ:ûµ¼Èë°ü
4. Ö¸¶¨ÁËÎÞЧURL
a) ¿ÉÄÜ:Êý¾Ý¿âÃû»òIP´íÎó,¼´Á¬½Ó³ö´í
5. Àà·¾¶Ã»ÓÐÕÒµ½
a) ¿ÉÄÜ: ClassNotFoundException: oracle.jdbc.driver.Or ......
Ò» ²åÈëÅÅÐò·¨:
˵Ã÷: ÿ´Î½«Ò»¸ö´ýÅÅÐòµÄ¼Ç¼£¬°´Æä¹Ø¼ü×Ö´óС²åÈëµ½Ç°ÃæÒѾÅźÃÐòµÄ×ÓÎļþÖеÄÊʵ±Î»Öã¬Ö±µ½È«²¿¼Ç¼²åÈëÍê³ÉΪֹ¡£ Java´úÂë public class InsertSorter extends Sorter { /** * from ÆðʼλÖà ......