基于 Java8 的常用算法与数据结构实现,所有程序均在 IntelliJ IDEA 中编写与调试,程序包含中英文注释,每个算法/数据结构是一个独立的 Project 。 Algorithms_Codes 文件夹中实现的数据结构有:动态数组、栈、队列、链表、二分搜索树、堆、优先队列、哈希表、线段树、字典树、并查集、红黑树、集合、映射;实现的算法有:线性搜索、二分搜索、选择排序、插入排序、冒泡排序、归并排序、快速排序、堆排序、希尔排序、字符串匹配等。Graph_Codes 文件夹中实现了常用的图论算法,包括深度优先搜索、广度优先搜索、求解联通分量、求解路径、环检测、二分图检测、求解最短路径、图匹配等。在这两个文件夹中,都有名为 LeetCode 的工程文件夹,分别包含了力扣上部分与经典算法和图论算法相关题目的实现,有些题目采用了不同解法进行求解。
本仓库将不定期更新,如发现错误,请在 Issues 中指出,欢迎 Fork 和 Pull requests 来完善代码,谢谢!
如果想要在本地查看这些程序,请克隆本仓库或下载压缩包。
- 克隆仓库
$ git clone git@github.com:YiBo-stu/Algorithms-Codes.git
$ cd Algorithms-Codes- 下载压缩包
点击 这里 下载压缩包。
This is an implementation of algorithms and data structures based on Java8, all the codes are finished and tested with IntelliJ IDEA, and comments in the form of either Chinese or English are incorporated. Each algorithm or data structure is managed in an independent Project. Data structures implemented in folder Algorithms_Codes include: Dynamic Array, Stack, Queue, LinkedList, Binary Search Tree, Heap, Priority Queue, Hash Table, Segment Tree, Trie, Union Find, Red-Black Tree, Set, Map; and algorithms in this folder include: Linear Search, Binary Search, Selection Sort, Insertion Sort, Bubble Sort, Merge Sort, Quick Sort, Heap Sort, Shell Sort, SubString Match, etc. The folder Graph_Codes contains commonly used algorithms concerning graphs, such as DFS, BFS, Connected Components, Path, Cycle Detection, Bipartite Graph Detection, Shortest Path, Graph Matching and so on. In both the two folders there are project folders called LeetCode, which contain implementations of problems from LeetCode, related to classical and graph-theoretic algorithms, respectively. And some of the problems are solved using different solutions.
This repository will be updated from time to time, if you find any errors, please point them out in Issues and feel free to Fork the repository as well as to improve the code by Pull requests, thanks!
To view these programs locally, please clone this repository or download the ZIP file.
1. Clone the Repository
$ git clone git@github.com:YiBo-stu/Algorithms-Codes.git
$ cd Algorithms-Codes- Download the ZIP file
Click here to download the ZIP file.