
算法
我要这中杯
假装和忍耐.
展开
-
(算法题)给定一个字符串,求第一个不重复的字符
public static void main(String[] args) { String str = "abbaddxyyu"; char result = 0; char tempChar = 0; char[] testData = str.toCharArray(); StringBuffer s...原创 2019-10-23 18:03:11 · 664 阅读 · 0 评论 -
(算法题)标号1-n的n个人首尾相接,1到3报数,报到3的退出,求最后一个人的标号
public static int getLastPeopleNum(ArrayList<Bean> tempList, int mode) { if (tempList != null) { ArrayList<Bean> list = (ArrayList<Bean>) tempList.clone(); ...原创 2019-10-23 17:14:44 · 623 阅读 · 0 评论