{"id":16157738,"url":"https://github.com/hutusi/rethink-c","last_synced_at":"2025-05-05T22:35:27.768Z","repository":{"id":64143544,"uuid":"196413348","full_name":"hutusi/rethink-c","owner":"hutusi","description":"A reuseable codebase for C Programming Language.","archived":false,"fork":false,"pushed_at":"2020-04-03T13:32:57.000Z","size":491,"stargazers_count":269,"open_issues_count":0,"forks_count":30,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-03-31T00:23:40.912Z","etag":null,"topics":["algorithm","algorithms","c","data-structures"],"latest_commit_sha":null,"homepage":"http://hutusi.com/rethink-c/","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hutusi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-07-11T14:44:59.000Z","updated_at":"2025-01-23T20:04:07.000Z","dependencies_parsed_at":"2022-12-07T11:19:20.842Z","dependency_job_id":null,"html_url":"https://github.com/hutusi/rethink-c","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hutusi%2Frethink-c","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hutusi%2Frethink-c/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hutusi%2Frethink-c/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hutusi%2Frethink-c/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hutusi","download_url":"https://codeload.github.com/hutusi/rethink-c/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252587170,"owners_count":21772422,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["algorithm","algorithms","c","data-structures"],"created_at":"2024-10-10T01:50:30.282Z","updated_at":"2025-05-05T22:35:27.752Z","avatar_url":"https://github.com/hutusi.png","language":"C","funding_links":[],"categories":["C"],"sub_categories":[],"readme":"# RETHINK C\n\n[![Build Status](https://travis-ci.org/hutusi/rethink-c.svg?branch=master)](https://travis-ci.org/hutusi/rethink-c)\n\nRelearn and rethink C Programming Language, including some of data structures and algorithms.\n\nThe code is licensed under the MIT license, copyright by [hutusi.com](http://hutusi.com/).\n\nSome of the code inspired (copied) by Simon Howard's [c-algorithms](https://github.com/fragglet/c-algorithms), like ArrayList, etc. This project also reused his alloc-testing framework for memory testing.\n\nRETHINK-C aims to build a reuseable codebase for C Programming Language. \n\n## How to build \u0026 test\n\n### Requirements:\n\n* Editor/IDE: VS Code is recommended.\n* GCC on Mac, Linux or Windows. (Recommend msys2 + MingW on Windows.)\n* CMake. \n* Clang-Format.\n\n### build \u0026 test:\n\n* build \n\n```\ncd build\ncmake ..\nmake\n```\n\n* test:\n\n```\nmake test\n```\n\n## Goals / Achievements\n\n### Basic Data Structures\n\n- [x] ArrayList, Stack [arraylist.h](src/arraylist.h) [arraylist.c](src/arraylist.c)\n- [x] LinkedList [list.h](src/list.h) [list.c](src/list.c)\n- [x] Queue [queue.h](src/queue.h) [queue.c](src/queue.c)\n- [x] BitMap [bitmap.h](src/bitmap.h) [bitmap.c](src/bitmap.c)\n- [x] Muti-dimensional Matrix [matrix.h](src/matrix.h) [matrix.c](src/matrix.c)\n- [x] Hash Table [hash_table.h](src/hash_table.h) [hash_table.c](src/hash_table.c) [hash.h](src/hash.h) [hash.c](src/hash.c)\n\n### Trees\n- [x] Binary Search Tree [bstree.h](src/bstree.h) [bstree.c](src/bstree.c)\n- [x] AVL Tree [avltree.h](src/avltree.h) [avltree.c](src/avltree.c)\n- [x] Red Black Tree [rbtree.h](src/rbtree.h) [rbtree.c](src/rbtree.c)\n- [x] Binary Heap [heap.h](src/heap.h) [heap.c](src/heap.c)\n- [ ] Fibonacci Heap, Binomial Heap\n- [x] Skip List [skip_list.h](src/skip_list.h) [skip_list.c](src/skip_list.c)\n- [ ] B+ Tree\n\n### Graphs\n- [x] Adjacency Matrix [graph.h](src/graph.h) [graph.c](src/graph.c)\n- [x] Adjacency List [sparse_graph.h](src/sparse_graph.h) [sparse_graph.c](src/sparse_graph.c)\n- [ ] Union-Find\n- [x] BFS \u0026 DFS [graph.h##bfs(), ##dfs()](src/graph.h)\n- [x] Topological sorting (Kahn) [sparse_graph_topo_sort()](src/sparse_graph.h)\n- [ ] Floyd\n- [x] Dijkstra [dijkstra.h](src/dijkstra.h) [dijkstra.c](src/dijkstra.c)\n- [ ] Minimum spanning trees: Prim, Kruskal\n- [ ] A-star\n\n### String \u0026 Text\n- [x] Text (similar to string in C++). [text.h](src/text.h) [text.c](src/text.c)\n- [x] BigNum integer [bignum.h](src/bignum.h) [bignum.c](src/bignum.c)\n- [ ] BigNum decimal \n- [x] KMP (Knuth-Morris-Pratt) algorithm [kmp.h](src/kmp.h) [kmp.c](src/kmp.c)\n- [x] BM (Boyer-Moore) algorithm [bm.h](src/bm.h) [bm.c](src/bm.c)\n- [x] Sunday algorithm [sunday.h](src/sunday.h) [sunday.c](src/sunday.c)\n- [x] Trie Tree [trie.h](src/trie.h) [trie.c](src/trie.c)\n- [x] Aho–Corasick algorithm [ac.h](src/ac.h) [ac.c](src/ac.c)\n- [ ] DAT (Double-Array Trie)\n- [x] Huffman coding [huffman.h](src/huffman.h) [huffman.c](src/huffman.c)\n\n### Sorting\n- [x] Quick Sort [arraylist.c##arraylist_sort()](src/arraylist.c)\n- [x] Merge Sort [list.c##list_sort()](src/list.c)\n- [x] Heap Sort [heap.h](src/heap.h) [heap.c](src/heap.c)\n\n### Math\n- [ ] Matrix multiplication\n- [x] Eratosthenes sieve (prime numbers) [prime.h](src/prime.h) [prime.c](src/prime.c)\n\n### Distance Measures\n- [x] Euclidean distance [distance.h##euclidiean_distance()](src/distance.h)\n- [ ] Manhattan distance \n- [ ] Hamming distance\n\n### MISC\n- [ ] Bloom filter\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhutusi%2Frethink-c","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhutusi%2Frethink-c","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhutusi%2Frethink-c/lists"}