会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
似水之心
可能没办法做到最好,但这不能成为不努力的理由。
博客园
首页
新随笔
联系
订阅
管理
1
2
3
4
5
6
下一页
2018年9月14日
HashMap、LinkedMap和TreeMap的比较
摘要: 目的 主要想测试一下HashMap、LinkedHashMap和TreeMap的有序性 运行结果: 结论 共同点: HashMap,LinkedHashMap,TreeMap都属于Map;Map 主要用于存储键(key)值(value)对,根据键得到值,因此键不允许键重复,但允许值重复。 不同点:
阅读全文
posted @ 2018-09-14 11:23 LynnMin
阅读(3665)
评论(1)
推荐(1)
2018年8月27日
归并排序
摘要: ``` package test; public class MergeSort { public static void main(String[] args) { // TODO Auto generated method stub int[] arr = { 10, 9, 8, 7, 6, 5
阅读全文
posted @ 2018-08-27 22:05 LynnMin
阅读(148)
评论(0)
推荐(0)
堆排序
摘要: ``` package test; public class HeapSort { public static void main(String[] args) { int[] arr = {10,9,8,7,6,5,4,3,2,1}; System.out.print("排序前;"); print
阅读全文
posted @ 2018-08-27 20:15 LynnMin
阅读(105)
评论(0)
推荐(0)
希尔排序
摘要: ``` package demo; public class ShellSort { public static void main(String[] args) { int[] arr = {5,4,3,2,1,0}; printArr(arr); shellSort(arr); printArr
阅读全文
posted @ 2018-08-27 16:42 LynnMin
阅读(105)
评论(0)
推荐(0)
2018年8月25日
代理模式
摘要: 定义 给某一对象提供一个代理对象,并由代理对象控制对原对象的引用。 静态代理 有些情况下,一个客户不想或者不能够直接引用一个对象,可以通过代理对象在客户端和目标对象之间起到中介作用。代理模式中的角色有: 1、抽象对象角色 声明了目标对象和代理对象的共同接口,这样一来在任何可以使用目标对象的地方都可以
阅读全文
posted @ 2018-08-25 15:54 LynnMin
阅读(193)
评论(0)
推荐(0)
快速排序
摘要: ``` package demo; / 快速排序; @author Lynn / public class QuickSort { public static void main(String[] args) { int[] arr = { 50, 10, 90, 30, 70, 40, 80, 6
阅读全文
posted @ 2018-08-25 14:46 LynnMin
阅读(177)
评论(0)
推荐(0)
2018年8月24日
插入排序
摘要: ``` package demo; / 插入排序; @author Lynn / public class InsertionSort { public static void main(String[] args) { int[] arr = {10,7,2,4,8,6,1,9}; System.
阅读全文
posted @ 2018-08-24 14:06 LynnMin
阅读(108)
评论(0)
推荐(0)
各种排序算法的稳定性和复杂度
摘要: 
阅读全文
posted @ 2018-08-24 11:14 LynnMin
阅读(191)
评论(0)
推荐(0)
简单选择排序
摘要: ``` package demo; / 简单排序 时间复杂度O(n^2) 不稳定; @author Lynn / public class SimpleSelectSort { public static void main(String[] args) { int[] arr = {10,7,2,
阅读全文
posted @ 2018-08-24 11:11 LynnMin
阅读(141)
评论(0)
推荐(0)
2018年8月23日
冒泡排序
摘要: 运行结果
阅读全文
posted @ 2018-08-23 17:37 LynnMin
阅读(133)
评论(0)
推荐(0)
1
2
3
4
5
6
下一页
公告