https://github.com/hotakus/clang-algorithms
C language library contains some useful algorithms adn data structures (such as hash table), and can help you develop. 包含一些有用的算法和数据结构(例如哈希表、链表),可以帮助您进行开发
https://github.com/hotakus/clang-algorithms
algorithms clang cmake embedded hashtable library
Last synced: 10 months ago
JSON representation
C language library contains some useful algorithms adn data structures (such as hash table), and can help you develop. 包含一些有用的算法和数据结构(例如哈希表、链表),可以帮助您进行开发
- Host: GitHub
- URL: https://github.com/hotakus/clang-algorithms
- Owner: Hotakus
- License: apache-2.0
- Created: 2023-05-17T14:48:51.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2023-07-19T11:56:20.000Z (almost 3 years ago)
- Last Synced: 2025-09-04T19:54:42.402Z (10 months ago)
- Topics: algorithms, clang, cmake, embedded, hashtable, library
- Language: C
- Homepage:
- Size: 251 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Hotakus' Clang Algorithms
contains some useful algorithms adn data structures, and can help you
develop.
---
## Directory Structure
Click links below to see details and API.
- **[Algorithms](./src/algorithms) - ([Details](./src/README.md))**: Some algorithms may be useful.
- **[Data Structures](./src/data_structures) - ([Details](./src/README.md))**: Some useful data structures.
- **[Katas](./src/katas) - ([Details](./src/katas/README.md))**: Some katas or tricks may be useful , such as MSE, LCS, Big Num problems.
- **[Questions](./src/questions) - ([Details](./src/questions/README.md))**: Some miscellaneous questions that may be unuseful in CodeWars .
- **[CMakeLists.txt](CMakeLists.txt)**: Compiles project to static libraries, and you can run 'main' in bin to test functions.
---
## How to use directly this project?
Nice problem, and easy to use.
You must fetch the repo to your project folder. and then, in `CmakeLists.txt` of your project (not this project),
add these codes below:
```cmake
add_subdirectory(./clang-algorithms/)
add_executable(your_project_name main.c)
target_link_libraries(your_project_name hca)
```
And then, test this project, in your `main.c`:
```c
#include
int main() {
printf("Welcome to use Hotakus' clang algorithms!!!\n")
hca_test(); // do test for some functions of hca.
hash_test(); // Hash table test
return 0;
}
```
---
## Only compile
```bash
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release -DCW_KATA_ARM=0
make
```
and you can see the definition `-DCW_KATA_ARM=0`, this option is for ARM(or Embedded System)
you can open [CMakeLists.txt](CMakeLists.txt) and find "CW_KATA_ARM", change options in it.
and run in "build" folder👇:
```bash
cmake .. -DCMAKE_BUILD_TYPE=Release -DCW_KATA_ARM=1
make
```
OK, all libs were compiled and move to "lib" folder in root path.
---