+ 8
Why data structures are so important ??
8 odpowiedzi
+ 8
As Ace wrote.
Another reason is modularity and readability- structures give you a way to create/describe complex objects and treat/pass them as one thing. This make your code simple and readable from the one side and easy to maintain and modular from the other side.
Actually, its exactly the reasons to use OOP- structs are one step towards classes...
+ 8
Modulatrity and readability structurs give you a way to create complex object and pass them as one thing.
+ 6
We can use data structures for many reasons:
1. To organise large amount of data, if we use data structures, it becomes easier to manage and retrieve data.
2. If we are not sure how much space we need for data say our data is growing dynamically. For example we have a website were n numbers of users can register so in such case we can use linkedlist which grows dynamically.
3. Like a Map in data structures which helps to organise data in key value pair. For example in our application I need to track everyday status of user, there I can create Map with key value pair to track status.
4. Google Maps geolocation can use Map data structures. Tree data structures can also be used to create Google Maps like application where it can show locations like Tree node.
There are many real world applications of data structures where we explicitly need to use it.
The more you would practice, the more you would learn yourself, why we need it? How it helps programmer to make life easier for them.
Happy Coding!
+ 3
Avoids the hassle of accessing multiple variables separately.
+ 2
Yea that is it
+ 1
Data structure also helps the compiler to allocate appropriate memory allocations and to prompt error messages when error is encountered.