JAVA实现stack2
package com.hb.ds.stack;class Node<T> { public Node<T> previous; public T value; public Node(T value, Node<T> previous){ this.previous = previous; this.val...
JAVA实现Stack
package com.hb.stack2;import java.util.LinkedList;public class Stack2<Node> { public static void main(String[] args){ Stack2<String> stack = new Stack2<String>(); stack.p...
JAVA实现单链表
package com.hb.ds.sigleLinkList;class ListNode { ListNode next; int value; public ListNode(int value){ this.next = null; this.value = value; } &nb...
JAVA实现二叉树
package com.hb.binaryTree;class BinaryTreeNode { int data; BinaryTreeNode left; BinaryTreeNode right; public BinaryTreeNode(int data) { this.data = data; ...
JAVA实现冒泡排序
package com.hb.bubbleSort;public class BubbleSort { public static void main(String[] args){ int a[] = new int[]{1,9,3,52,5,6}; System.out.println("排序前:");&...
JAVA实现选择排序
package com.hb.selectSort;public class SelectSort { public static void main(String[] args){ int[] a = new int[] {6,1,54,2,7,8}; System.out.println("排序前:");...
JAVA快排实现 QuickSort
package com.hb.quickSort;public class QuickSort { public static void main(String[] args) { int a[] = new int[] { 12, 32, 51, 5, 5, 1, 6 }; System.out.println("排序前:");...
Hanoi递归实现
package com.hb.hanoi;public class Hanoi { private static int step =1; private static int moveTime = 0; public static void hanoi(int n, char A, char B, char C) { if (n...