I would like to find a data structures book that uses straight C, is designed pretty well, helps you build your own little data structures library, etc. Any recommendations would be great, thanks.
Printable View
I would like to find a data structures book that uses straight C, is designed pretty well, helps you build your own little data structures library, etc. Any recommendations would be great, thanks.
Data structures on their own is usually not particularly meaningfull. Studying algorithms (there are MANY books on the subject, I have one by "sedgewick" that is OK) will also cover some types of data structures (such as linked lists, various types of trees, hash-tables to name but a few).
Also books about "good programming" often cover "how to create a good data structure".
Once you have that basic understanding, the usage of data structures in general should be covered. There will of course be "problem specific" data structures (3D graphics uses something called a quad-tree, for example). Those would be part of any book on the relevant subject.
--
Mats
Hello,
Like philvaira i'm also looking for a good book, e-book or some links preferablly with examples to help me on the subject abstract, generalized data structures, so i won't be limited to int, char or struct, when using them in single/double lists.
Thank you.
IMO, your best bet is to use a void * in a linked list structure as the data type that it holds, and keep the list ignorant about the type that it will use.
Have the programs that use the list deal with what types should be in the list or not in the list. If you have to deal with multiple types, perhaps you could use a struct that contains a union of different types. In addition, your struct could contain an enum or int var that lets your program know what variable a node is actually of.
thank you, but beside the fact that I'm at beginner level , it's also a big chaos in my head, so i really need to read more about structures and lists and see some clear examples of what i might need for my homework.
I konw it's not the best method to learn but i have no choice. Anyway i found some titles in the recommandation topic hope i'll find the books too.