So, I've been wondering, is there a best way to store data? - Obviously that's a fairly debatable subject. However, I've been thinking about data structures, and what would be the best generic data structure, I mean what would be the best data structure for 'n' data type? Or 'n' amount of data too.
I can imagine something like an array being exceptional for storing small amounts of data, although I'm not 100% sure if that is the case, I am no expert, by any means. This is why I've decided to start my personal project of creating my own abstract data structure, I feel that this will both help develop my programming abilities, as well as my theoretical understanding.
I've got a fairly basic, but good enough understanding of complexity theory, like with data structures, there are some that are better for searching, some are better for the amount of space required to store the input data. Luckily for me, my lecturer went over the basics of the complexity of some basic and generic data structures, so I have a basic enough idea.
I have the idea of implementing a list like tree, but I can imagine that being terrible in terms of the amount of space required, it would be something like O(N^n). Please correct me if I'm wrong, but I'm I would've imagined that would be the case? - I want to try and develop something that's excellent for querying, as well as the amount of space required. If I can possibly manage it, I'd like to try and develop my own implemented data structure that's both O(N) for the amount of time taken to store and search the data.
I would also like to cheat a little bit by implementing a sorting algorithm that sorts the data as it's input into the data structure. If possible, I'd like to develop some form of data structure that's capable of storing the data, then somehow optimising the stored data itself, but I would also imagine there'd be the problem of searching the structure's data, whilst it's optimising itself.
This is nothing more than a project, my initial idea was a star like tree, you'd have a central node, where it would have (for arguments sake) 5 branches coming from the one central node, then from every child node of the central node, you could have another 5 branches. Would this work well, in theory, of course half of this question purely depends on how it's implemented, but let's say it's implemented perfectly, just for the sake of debate. How effective would it be for searching, sorting and would it require a lot of space? - Like I've said, my understanding of complexity theory is basic, but what I know is good enough for me to learn from others.