0

why do we need data structures, if it is a way of storing data in computer in an efficient way, then the computer itself has the ability to store the data in an efficient way, why do we create linked lists n other stuffs. why do we use stacks,trees n other stuff in c???

5
Contributors
5
Replies
7
Views
6 Years
Discussion Span
Last Post by Jason Giggs
0

Each structure has it's advantages - and disadvantages. It's like what you drive. You'd want a race car for racing (great for speed and handling), but a diesel truck for towing (loads of low end torque), the heavy loads.

0

Like Adak said, each structure has it's advantage and disadvantage; the analogy was spot on. Not all forms of data storage is acquit for every scenario.

0

actually, my question was different. i meant that why do we need to use data structure?

0

>i meant that why do we need to use data structure?
That's the same question you asked originally. Clearly you're not expressing your question in a way that can be understood, so try rewording it.

1

data structures organise data and store it in an efficient way. You don't want data to be cluttered and disorganised, do you?
also, we want to make maximum use of disk space and we also want the data access time to be as low as possible. But both of these requirements are hard to be met in one data structure.
some data structures provide minimum access time, while other use space judiciously. hence we can use the appropriate data structure according to our requirements.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.