Skip to content

Implement some data structures and algorithm.

Notifications You must be signed in to change notification settings

SSSxCCC/Algorithm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Algorithm

总结常用数据结构和算法。

本项目实现:

快速排序QuickSort

归并排序MergeSort

基数排序RadixSort

拓扑排序TopologicalSort

缓存LruCache

最短路径Dijsktra

最短路径Floyd

并查集UnionFind

分数Fraction

字典树Trie

树状数组BinaryIndexedTree

线段树SegmentTree

Zkw线段树ZkwSegmentTree

字符串匹配KnuthMorrisPratt

java自带:

哈希表HashMap、HashSet:快速映射去重,重写equals和hashcode

红黑树TreeMap、TreeSet:排序且去重,注意compareTo相等就去重,不看equals和hashcode

优先队列PriorityQueue:取最大/最小值

运行

1.下载源代码

2.使用IntelliJ IDEA打开项目

3.设置Java版本>=8

4.打开任意数据结构/算法的源代码,运行main函数

About

Implement some data structures and algorithm.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages