r/C_Programming • • Jul 31 '26

Celebrating 200 leetcode questions solved: Sharing yet another C generic data structures library

https://github.com/kadabrium/CStyleDS

Everyone who has programmed in C has to have made one of these, and I will not break the trend. The difference (for good?) is this one is made basically only with leetcode in mind, but any form of consistent usage is usage amirite. Single header based, read: copypasta ready

11 Upvotes

9 comments sorted by

â€ĸ

u/github-guard Jul 31 '26

🔍 GitHub Guard: Trust Report

âš ī¸ This project scored 1/6 — below this subreddit's threshold of 3.

Audit Breakdown:

  • ❌ Low Star Count (⭐ 0 / 5 required)
  • ❌ New Repository (under 30 days old)
  • ✅ Licensed under MIT
  • ❌ No Security Policy — what is this?
  • â„šī¸ Individual Contributor
  • â„šī¸ Unsigned Commits

âš ī¸ Security Reminder: Always verify source code and run third-party scripts at your own risk.

6

u/Comfortable_Put6016 Aug 02 '26

the C standard forbids the identifiers with <underscore><uppercase> - these are reserved

you randomly disagree with your own api by void-ing key sizes and just strlen-ing byte sequences - who tells you these are null terminated? Also it seems you leak abstractions (at least for the map/set init - e.g. user providing 0 as size)

please learn to format or better use an auto formatter

file names with a leading underscore? Also you randomly change the file namimg convention between directories

you cant byte eq compare structs unless they satisfy certain requirements - e.g. instances of { short a; int b; } might not equal another given 2 padding bytes between a and b to reinstate default alignment for an int type

please take this as criticism and not insults

-1

u/Kadabrium Aug 03 '26

The first one is blacephalon, but i agree im comically behind in auto formatting stuff. The struct hash functions are already designed to hash member by member, they passed whatever little amount test i did, i'll check again

8

u/Comfortable_Put6016 Aug 04 '26

blacephalon is a pokemon and not an english word ; what are you trying to say

1

u/AutoModerator Jul 31 '26

Hi /u/Kadabrium,

Your submission in r/C_Programming was filtered because it links to a git project.

You must edit the submission or respond to this comment with an explanation about how AI was involved in the creation of your project.

While AI-generated code is not disallowed, low-effort "slop" projects may be removed and it's likely that other users push back strongly on substantially AI-generated projects.


I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

1

u/Kadabrium Jul 31 '26
  • AI usage disclosure: documentation and tests largely AI generated. For source files, AI used for inline debugging only. (See end of README)

1

u/mikeblas Aug 01 '26

What is "inline debugging"?

-2

u/Kadabrium Aug 01 '26

If i had issues with a particular line i point at it so it never has to generate more than a couple lines at a time. In reality I needed it mostly for design choice validations and a bit of macro syntax lookup in the beginning. I did let it go through a refactor about mid way for the hash map, when it pointed out theres an easy update from the early python3 style open addressing i went in with

-1

u/mikeblas Aug 02 '26

OK. I have approved your post.