算法
南城徐凤年
本主支持原创,开源,代码可用,案例真实,如有不足,欢迎指正,不胜感激。
展开
-
java排序算法
一、算法总结一览无余 二、具体的算法实现: 1、冒泡排序 public static int[] sort(int[] nums){ for (int i = 0;i<nums.length;i++){ //每次for循环都会确定一个最大值 for (int j = i;j<nums.length;...原创 2019-11-14 14:17:55 · 106 阅读 · 0 评论 -
十进制转n进制n小于10
//十进制转换n进制,n<10 public class Transfer10to5 { private static Stack<Integer> stack = new Stack<>(); public static Stack<Integer> transfer(int num){ if(num < 5){...原创 2019-11-13 20:19:36 · 164 阅读 · 0 评论 -
单链表逆转
public class LinkedInvert { public static Node initLinked(){ Node head = new Node(); Node n1 = new Node(1); Node n2 = new Node(2); Node n3 = new Node(3); ...原创 2019-11-13 20:16:23 · 133 阅读 · 0 评论