摘要: 1 package leetcode; 2 3 import java.util.ArrayList; 4 import java.util.List; 5 6 public class N3 { 7 public static void main(String[] args) { 8 String 阅读全文
posted @ 2021-03-10 22:42 TRAODM 阅读(47) 评论(0) 推荐(0)
摘要: 1 package demo030302; 2 //方法二,三个窗口卖票 3 public class SalesTickets { 4 public static void main(String[] args) { 5 Sales sales = new Sales(); 6 Thread t 阅读全文
posted @ 2021-03-03 21:43 TRAODM 阅读(120) 评论(0) 推荐(0)
摘要: 1 package demo030301; 2 //多线程练习,创建三个窗口卖票,总票数为100 3 public class SaleTickets { 4 public static void main(String[] args) { 5 Windows w1 = new Windows(); 阅读全文
posted @ 2021-03-03 20:51 TRAODM 阅读(114) 评论(0) 推荐(0)
摘要: 1 package demo030102; 2 3 import java.util.Arrays; 4 5 public class HeapSort { 6 public static void main(String[] args) { 7 int[] arr = new int[]{22, 阅读全文
posted @ 2021-03-01 21:04 TRAODM 阅读(55) 评论(0) 推荐(0)
摘要: 1 package demo030101; 2 3 public class ArrayBinaryTree { 4 int[] data; 5 //传入一个数组,并看成是二叉树 6 public ArrayBinaryTree(int[] data){ 7 this.data=data; 8 } 阅读全文
posted @ 2021-03-01 20:08 TRAODM 阅读(79) 评论(0) 推荐(0)
摘要: 递归! 阅读全文
posted @ 2021-03-01 19:08 TRAODM 阅读(119) 评论(0) 推荐(0)
摘要: 1 package queue_radix; 2 3 public class Queue { 4 int[] queue; 5 6 public Queue(){ 7 queue = new int[0]; 8 } 9 10 public boolean isEmpty(){ 11 return 阅读全文
posted @ 2021-02-28 19:16 TRAODM 阅读(53) 评论(0) 推荐(0)
摘要: 1 package radixsort; 2 3 import java.util.Arrays; 4 5 public class RadixSort { 6 public static void main(String[] args) { 7 int[] arr = new int[]{3,55 阅读全文
posted @ 2021-02-28 16:55 TRAODM 阅读(40) 评论(0) 推荐(0)
摘要: 1 public class recursion { 2 public static void main(String[] args) { 3 int n = 5; 4 char a ='a'; 5 char b ='b'; 6 char c ='c'; 7 hanoi(10,a,b,c); 8 9 阅读全文
posted @ 2021-02-28 15:21 TRAODM 阅读(71) 评论(0) 推荐(0)
摘要: 1 package mergesort; 2 3 import java.util.Arrays; 4 5 public class MergeSort { 6 public static void main(String[] args) { 7 int[] arr = new int[]{11, 阅读全文
posted @ 2021-02-28 10:11 TRAODM 阅读(52) 评论(0) 推荐(0)