标签:ever col for rev color rgba font == eve
Array.length is even
* * * * * *
^
(Array.length-1)/2
* * * * * *
^
Array.length/2
当Array.length is even, -1 对中值index有影响
Array.length is odd
* * * * *
^
(Array.length-1)/2 == Array.length/2
当Array.length is odd, -1 对中值index无影响
example:
1: reverse Array
for(int i=0;i<array.length/2;++i){
int tmp=array[array.length-1-i];
array[array.length-1-i]=array[i];
array[i]=tmp;
}
标签:ever col for rev color rgba font == eve
原文地址:https://www.cnblogs.com/dissipate/p/14902593.html