① java怎麼把2個字元串拼接在一起
差距很大
GTX1060撐死也就GTX980的性能
RX 480和頂級非公GTX970差不多
而GTX1070比GTX980TI還強一點
二者差距百分之40
② java 列出一個字元串的全字元組合情況,不考慮重復字元
package;
importjava.util.Arrays;
importjava.util.LinkedList;
publicclassRecursionSub3Sort
{
staticintcount=0;
staticchar[]array={'a','b','c'};
staticLinkedList<char[]>list=newLinkedList<char[]>();
staticint[]indexs=newint[3];
staticintlen=array.length;
publicstaticvoidmain(String[]args)
{
getSub();
for(char[]cs:list)
{
System.out.println(Arrays.toString(cs));
}
}
privatestaticLinkedList<char[]>getSub()
{
while(count<=len)
{
recursionSub(0,-1);
count++;
}
returnlist;
}
privatestaticLinkedList<char[]>recursionSub(intind,intstart)
{
start++;
if(start>count-1)
{
returnnull;
}
for(indexs[start]=0;indexs[start]<len;indexs[start]++)
{
recursionSub(0,start);
if(start==count-1)
{
char[]temp=newchar[count];
for(inti=count-1;i>=0;i--)
{
temp[start-i]=array[indexs[start-i]];
}
if(temp.length==1
||Arrays.toString(temp).replaceAll("[\[\]\s,]","").replaceAll("(\w)\1+","$1")
.length()!=1)
{
list.add(temp);
}
}
}
returnlist;
}
}