Anonymous user
Best shuffle: Difference between revisions
→{{header|Java}}
(→{{header|JavaScript}}: added Java) |
|||
Line 781:
}
public static String bestShuffle(String
char[]
for (int
char tmp = s2[i];
s2[i] = s2[j];
Line 794 ⟶ 793:
}
}
return
}
Line 808 ⟶ 807:
}
private static int count(
int count = 0;
for (int i = 0; i <
if (
count++;
}
}
return count;
}
|