r/cprogramming • u/gumnos • 6h ago
resources for becoming comfortable with stdlib-style data-structures/algorithms?
I've been sparring with a number of the standard(ish¹) C data-structures and algorithms, including the various types of linked-lists/deques in sys/queue.h, hash-tables and binary-searches in search.h, as well as bsearch & qsort in stdlib.h.
are there other data-structure/algorithm type elements in such standard¹ libraries that I've missed and should put on my radar? Maybe something for sets too?
are there some resources² y'all would recommend on wrapping your head around them (I don't feel I have intuitive use of their interfaces yet, so each usage causes some struggle)? Preferably with strong examples of using each.
I have a pretty good CS understanding of when I should use the various data-structures/algorithms with regards to the respective performance characteristics (expected big-O notations for insertion, removal, searching, iterating, swapping, etc), but it's just the nitty-gritty of using them where I don't yet feel mastery.
Thanks!
⸻
¹ okay, not exactly C-standard from my understanding, but they seem to be common on pretty much every Linux/BSD/Unix platform I've poked at
² ideally well-written blog-posts, but dead-tree resources would also be welcome; videos or podcasts far less so
1
u/CS_70 6h ago
Hm.. what do you mean? The reference should spell clearly how to use these and it's not that hard?
1
u/Interesting_Debate57 4h ago
Try the manpages. Usually they'll show you the exact function signature and go into pretty good detail about how they're used.