
算法
憨厚2016
进击路上的小菜鸟
展开
-
使用数组实现队列
使用数组实现队列public class MyQueue { private int[] array; private int front; private int rear; public MyQueue(int capacity) { this.array = new int[capacity]; } public voi...原创 2019-11-17 20:16:55 · 102 阅读 · 0 评论 -
随机出 不一样的 5个数
import java.util.*;public class test {public static void main(String[] args) {int n = 30; Random rand = new Random();//新建一个随机类 boolean[] bool = new boolean[n]; int randInt = 0...原创 2017-06-19 21:44:15 · 675 阅读 · 0 评论