This repo is licensed under CC BY-NC-SA 4.0
This repo stores C++ implementations of common data structures and algorithms as listed below, note that the lists and trees are completed without STL
-
Linear Lists
- Sequential (Completed)
- Linked (Completed)
- Stack (Completed)
- Queue (Completed)
-
Tree Structures
- Multi
- Basic (Completed)
- Binary
- Basic (Completed)
- Heap (Completed)
- Search
- Basic (Completed)
AVLRed-Black
- N-ary
BasicSearchB+
- Multi
-
Sorting Methods
-
$O(n^2)$ - Selection (Completed)
- Insertion (Completed)
- Bubble (Completed)
-
$O(n\ln{n})$ - Heap (Completed)
- Merge (Completed)
- Quick (Completed)
-
$O(n)$ BucketRadix
-
-
Graph
- Structures
- Disjoint Set Union (Completed)
Adjacency-MatrixAdjacency-List
- Algorithms
- MST
Prim-ListPrim-HeapKruskal
- Search
BFS/DFSDijkstraA*
- MST
- Structures
Though several of them are not completed because of my lack of leisure, you can also check related notes posted on my own blog for detailed explanations
- Ensure that your VSCode has installed these addons:
C/C++
,CMake
,CMake Tools
, then clone this repo and open it in VSCode
git clone https://github.com/WhythZ/DataStructure.git
- Use
Ctrl + Shift + P
and then findCMake: Configure
, choose your local compiler such as gcc from MinGW, then createbuild
folder in root directory,cd build
enter it in terminal, use instructions below to generate Makefiles
cmake -G"MinGW Makefiles" ..
- Then use following command to compile all the codes for the first time or after whenever you edit the codes
cmake --build .
- After that you can use
Ctrl + F5
to run the executable file to print the running process of the test cases visually in console, by the way if you want to debug the codes with gdb- Change the
"miDebuggerPath"
value in thelaunch.json
to your local MinGWgdb.exe
directory - Then input
Ctrl + Shift + D
and click related button to start debugging with gdb tools
- Change the