{"id":24779204,"url":"https://github.com/rocketmadev/dsexperiment","last_synced_at":"2025-07-07T02:39:04.110Z","repository":{"id":274113020,"uuid":"921804344","full_name":"RocketMaDev/DSExperiment","owner":"RocketMaDev","description":"DataStructure Experiment in HDU, Cyber Security","archived":false,"fork":false,"pushed_at":"2025-02-06T05:59:32.000Z","size":94,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-05T04:02:36.670Z","etag":null,"topics":["c","datastructures","hdu","make"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/RocketMaDev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-01-24T16:42:25.000Z","updated_at":"2025-02-08T09:16:59.000Z","dependencies_parsed_at":"2025-01-25T01:13:16.805Z","dependency_job_id":null,"html_url":"https://github.com/RocketMaDev/DSExperiment","commit_stats":null,"previous_names":["rocketmadev/dsexperiment"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/RocketMaDev/DSExperiment","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RocketMaDev%2FDSExperiment","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RocketMaDev%2FDSExperiment/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RocketMaDev%2FDSExperiment/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RocketMaDev%2FDSExperiment/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RocketMaDev","download_url":"https://codeload.github.com/RocketMaDev/DSExperiment/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RocketMaDev%2FDSExperiment/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264003094,"owners_count":23542554,"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":["c","datastructures","hdu","make"],"created_at":"2025-01-29T09:35:56.052Z","updated_at":"2025-07-07T02:39:04.090Z","avatar_url":"https://github.com/RocketMaDev.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DS Experiment HDU\n\n这个仓库里的源代码是杭电网安学院的数据结构课程设计的作业。\n\n[English version](README_en.md)\n\n\u003c!-- 别选CQ的课，要求很多 --\u003e\n\n## 特性\n\n1. 所有代码均符合书上的思路，例如在静态查找中是逆序，在数组0处存放哨兵块。\n2. 所有头文件均包含注释，讲述如何使用。\n3. 所有测试案例编译时无错误、警告，运行时无内存泄露。\n4. 可复用性、稳健性。代码考虑了较多edge case并且考虑如何在上层模块中使用。\n   **但是不要在生产环境中使用！**\n5. 标准化的项目结构。源码和头文件存储在`src/`中，对象文件存储在`build/`中，\n   测试文件存储在`test/`中，最后的可执行程序在`./`下。\n6. 采用GNU Make编译，方便快捷。\n7. 纯C实现。\n\n\u003e 没有上传实验报告是刻意的，我也不会上传。请先学会编译这个项目。\n\n## 编译\n\n所有代码在Arch Linux + gcc的环境下顺利通过所有测试，但未使用过其他环境。\n请注意，代码中存在gcc特有指令，VS不一定能顺利编译。\n\n使用GNU Make构建系统，使用`make TARGET=$EXE`来编译目标，目标可以从`Makefile`中找到。\n默认开启`-O2`编译，如果想要调试可以使用`make TARGET=$EXE DEBUG=1`开启调试符号。\n此时优化等级会降至默认级别。\n\n想要编译一整个实验的相关程序，可以使用`make experiment$i`，`i`可以是1-5，\n具体章节生成的对应的程序可以在`Makefile`中找到。\n\n想要清除依赖（`.o`）而不清除生成的程序（有些代码生成的`.o`文件可能不一致），\n可以使用`make clean_deps`，想要清除所有程序与依赖，可以使用`make clean`。\n\n## “我有疑问”\n\n当发现编译时无法正常工作，有bug，想要给其他平台做适配等，请参阅[贡献](CONTRIBUTING.md)一节。\n\n## 打包源代码\n\n由于模块的高复用性，后期实验的模块往往需要打包整一个项目。\n如果不想每个实验都上交一样的代码，可以检出到对应的标签，打包我在每个实验所上交的代码。\n~~不过估计老师也不会看的~~\n\n例如使用`git checkout experiment1`可以回溯到实验1的代码，在使用zip等工具打包后，\n使用`git checkout main`回到主线头部。\n\n## 实验具体任务\n\n实验的所有任务我打包放在Releases里了，请自行解压。除了最后一个实验，其他实验都验收通过了，\n最后一个实验没有安排验收课，因此说不清楚验收情况请知悉。\n\n## 致谢\n\n排序模块用到了[@zhouxumeng213](https://github.com/zhouxumeng213/sort)的代码，\n关于avl树优化验证来自[这篇知乎上的文章](https://zhuanlan.zhihu.com/p/454080520)。\n\n## 博客\n\n看看这个项目的博客： https://rocketma.dev/2025/02/01/datastructure/\n\n## License\n\n本项目基于GPLv3分发，详情请见[LICENSE](LICENSE)。\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frocketmadev%2Fdsexperiment","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frocketmadev%2Fdsexperiment","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frocketmadev%2Fdsexperiment/lists"}