2016年2月25日 星期四

generator-vview hview



{vView}{vViewLabel}{vViewValueStyle}
{vViewValue}{/vViewValue}
{vView}{hView}
{vViewLabel}Part No.{/vViewLabel}
{vView}
{vViewValueStyle}font-weight: bold;TEXT_IMPORTANT{/vViewValueStyle}

2016年2月24日 星期三

2016年2月7日 星期日

Graphs: Dijkstra's Algorithm ccc

https://www.youtube.com/watch?v=8Ls1RqHCOPw


http://www.cemc.uwaterloo.ca/contests/past_contests.html

java-sort


source :

http://mathbits.com/MathBits/Java/arrays/SelectionSort.htm



Array at beginning: 846976869491
After Pass #1:849176869469
After Pass #2:849194867669
After Pass #3: 869194847669
After Pass #4: 949186847669
After Pass #5 (done): 949186847669

While being an easy sort to program, the selection sort is one of the least efficient.  The algorithm offers no way to end the sort early, even if it begins with an already sorted list.  

// Selection Sort Method for Descending Orderpublic static void SelectionSort ( int [ ] num )
{
     int i, j, first, temp; 
     for ( i = num.length - 1; i > 0; i - - ) 
     {
          first = 0;  
 //initialize to subscript of first element
          for(j = 1; j <= i; j ++)   
//locate smallest element between positions 1 and i.
          {
               if( num[ j ] < num[ first ] )         
                 first = j;
          }
          temp = num[ first ];   //swap smallest found with element in position i.
          num[ first ] = num[ i ];
          num[ i ] = temp;
      }          
}

 


Programing


Java Selection

Selection Sort

Java Repetition

recursion



Graph Search Implementation graph search wiki

Scanner in = new Scanner(System.in); int next = in.nextInt();