import java.util.Arrays; public class AddArray { public static void main(String[] args) { int[] arr = {1,4,2,4,11,33,22,67,43}; for (int i : sort(arr,23)) { System.out.print(i+"\t"); } System.out.println(); for (int i : sort1(arr,45)) { System.o…
面试题查找重复元素并打印重复次数和重复位置,一顿懵逼,回来死磕写下来,打印指定重复次数和最大次数,其他在此基础上可以再更新 package sort; import org.testng.annotations.Test;import sun.org.mozilla.javascript.internal.ast.NewExpression; import java.util.*; /** * Created by liangwei on 2018/10/18. */public class S…