zno2

随笔分类 -  java data structure

2)最短路径应用
摘要:路径拟合: 1. 准备数据 门架点集合、门架点连通关系、任意连通的门架点之间最短路径(通过最短路径算法,基于门架连通关系数据计算得出) 2. 入参 有序的门架点数组 3. 计算 a. 初始化连通关系数据 b. 初始化最短路径数据 c. 将入参数组按照相邻点,两两分组,分别验证连通性。若某组两点具备连 阅读全文

posted @ 2023-08-09 18:28 zno2 阅读(60) 评论(0) 推荐(0)

1) 最短路径 思路
摘要:一、名词解释 临接矩阵: Dijkstra 算法: G: graph V: vertex E: edge 二、生成临接矩阵 a -> b(1) b-> c(5) b->d(2) d->c(2) 阅读全文

posted @ 2023-08-09 18:27 zno2 阅读(33) 评论(0) 推荐(0)

摘要:Introduction to Tree – Data Structure and Algorithm Tutorials What is a Tree data structure? A tree data structure is a hierarchical structure that is 阅读全文

posted @ 2023-08-03 19:50 zno2 阅读(83) 评论(0) 推荐(0)

部门等级控制部门可见度(虚拟根节点)
摘要:部门等级 1,2,3,... 数字越小等级越高,高等级可以看低等级节点 每个用户有部门等级,且需要等于或高于所在节点部门等级 有且只有一个根节点 11 ,其部门等级是1 ×掉的一枝,第一个节点就是虚拟根节点,这个枝就是该用户可见的组织架构 一条线上的节点的部门等级是逐渐降低的 假设有用户33_1 ( 阅读全文

posted @ 2023-08-03 19:45 zno2 阅读(51) 评论(0) 推荐(0)

排序算法(sorting algorithm) 之 归并排序(merge sort)
摘要:初版(探索):运行很慢,写法有问题 import java.util.Arrays; import cn.hutool.core.util.RandomUtil; public class MergeSortTest { public static void main(String[] args) 阅读全文

posted @ 2023-06-02 08:14 zno2 阅读(35) 评论(0) 推荐(0)

1亿个数引发的思考(二)之 开拓视野 BitMap Index 和 布隆过滤器
摘要:java实现: java.util.BitSet 谷歌实现 <dependency> <groupId>com.googlecode.javaewah</groupId> <artifactId>JavaEWAH</artifactId> <version>1.2.3</version> </dep 阅读全文

posted @ 2023-06-02 08:10 zno2 阅读(43) 评论(0) 推荐(0)

1亿个数引发的思考(一)
摘要:1) 如何生成1亿随机数答:生成有序数组,遍历时生成随机下标进行交换2)存储1亿个数字文件多大?答:约1G3)1亿代表的是一类什么问题?答:内存不够用的问题,因为内存不能无限扩张,数据却可以4)内存不够用时怎么办?答:借助外存,并充分利用内存5)外存文件需要一开始就切割成小块,然后分别排序,再归并吗 阅读全文

posted @ 2023-06-02 08:10 zno2 阅读(70) 评论(0) 推荐(0)

jfreechart 排序算法动图
摘要:JFreeChart is a free 100% Java chart library that makes it easy for developers to display professional quality charts in their applications. https://w 阅读全文

posted @ 2023-06-02 08:08 zno2 阅读(33) 评论(0) 推荐(0)

排序算法(sorting algorithm) 之 选择排序(selection sort)
摘要:https://en.wikipedia.org/wiki/Selection_sort loop1: 4,6,1,3,7 -> 4,6,1,3,7 4,6,1,3,7 -> 1,6,4,3,7 1,6,4,3,7 -> 1,6,4,3,7 1,6,4,3,7 -> 1,6,4,3,7 loop2: 阅读全文

posted @ 2018-12-19 16:46 zno2 阅读(256) 评论(0) 推荐(0)

排序算法(sorting algorithm)之 插入排序(insertion sort)
摘要:https://en.wikipedia.org/wiki/Insertion_sort loop1: 4,6,1,3,7 -> 4,6,1,3,7 loop2: 4,6,1,3,7 -> 4,1,6,3,7 4,1,6,3,7 -> 1,4,6,3,7 loop3: 1,4,6,3,7 -> 1, 阅读全文

posted @ 2018-12-19 16:45 zno2 阅读(238) 评论(0) 推荐(0)

排序算法 (sorting algorithm)之 冒泡排序(bubble sort)
摘要:http://www.algolist.net/Algorithms/ https://docs.oracle.com/javase/tutorial/collections/algorithms/ https://en.wikipedia.org/wiki/Sorting_algorithm 冒泡 阅读全文

posted @ 2018-12-19 16:44 zno2 阅读(596) 评论(0) 推荐(0)

java.util.HashMap
摘要:load factor 满载率 capacity 容量 threshold 临界值 控制treeify的临界值是8 ,当bin中链大于8时,则尝试treeify 1)如果此时表容量不足64,则会扩表。因此添加第9个元素时,由16->32 ,添加第10个元素时,由32->64 2)添加第11个元素时, 阅读全文

posted @ 2017-09-11 12:36 zno2 阅读(519) 评论(0) 推荐(0)

导航