Solutions and practices for data structure and algorithms (DSA), refering to the high frequency questions in LeetCode.
All the solutions are located in the \src
dir. It only supports C++/C++11 now.
The solution for every question has run pass the tests online and explains the detailed methods with its complexity in the \doc
and every source code in \src
.
This project is built with following tools:
- C++ version:
C++11
- Build system:
CMake
- C++ compiler:
g++
- Libraries:
STL
only - Code coverage:
lcov
(note: it should show the code coverage is below 100%) CodeCov
(code coverage is measured by CodeCov).- Source & Tests:
\src
To build the project you need to install CMake
. Here are the instructions. To create code coverage report you need to install lcov
. Download lcov
from here you can download latest lcov
and here are instructions
. This reports will be later uploaded to CodeCov servers.
The basic knowledge of various data structures and algorithms, along with their applications in LeetCode problems
are summarized in \doc
.Detailed contents are shown below:
- Basic operations for basic data structures.
- array, single linked list
- stack, queue
- priority queue
- skip list
- hash
- Operations for tree.
- Binary search tree (BST).
- Heap
- Advanced BST
- RB tree
- AVL tree
- Splay tree
- B-/B+/B* tree
- Operations for Graph.
- Dynamic programing.
- Other algorithms.
This project is licensed under the MIT License - see the LICENSE file for details.