-->
Search here and hit enter....

Introduction to Data Structures & Algorithm | Selecting Data Structure | Part 2 |

   Hello Viewer! how are you? I hope you are very well. Today I have learned about the Criteria for selecting Data Structure, Elementary Data Structure Organization. below I have written whatever I learn today ...

selecting data structure


Analysis is very important for choosing appropriate Data Structures and designing any program. A program designer with a poor understanding of the Data Structure concept ignore this analysis step and apply a Data Structure with which they can work comfortably.

The applied data structure may not be appropriate for the problem at hand and therefore may result in poor performance. (like slow speed of operation)

Conversely, if a program meets its performance goals with a Data Structure that is simple to use, then it makes no sense to apply complex Data Structure to that problem to exhibit the programmer's skill.


-When selecting a Data Structure to solve a problem, the following steps must be performed:-

  • Analyze the problem to determine basic operations must be supported (like inserting, deleting, searching item for Data Structure)
  • Quantify the resource constraints for each operation.
  • Now Finally, Select the Data Structure that best meet its requirements.

In the approach, 
1st concern is the Data and the operations that are to be performed on them,
2nd Concern is a representation of Data. and 
3rd is Implementation of that representation.

There are many types of Data structures that are supported in different programming languages.
  • While one of the Data Structures may permit adding of new Data Items only at the beginning, the others may allow them to be added at any position, while one data structure may allow accessing data items sequentially, the other may allow random access of Data
  • So selection of an appropriate Data Structure for the problem is a crucial decision and may have a major impact on the performance of the program.

ELEMENTARY DATA STRUCTURE ORGANIZATION 

-Data Structures are building blocks of a program.
-A Program built using improper Data Structures may not work as expected. 
  • So As a programmer, it is mandatory to choose an appropriate data structure for a program.

-The term data means to value or set of values.
It Specifies either the value of a variable or a constant (ex-  marks of students, name of an employee, address of a customer, the value of pi etc. )

-While a data item that does not have a subordinate data item is called an elementary Data Item and one that is composed of one or more subordinate data items is called a group item.  

for example:- a student name may be divided into three subitems like firstName, middleName,lastName treated as "group Data Item" while roll number cannot be further divided so it is treated as "Elementary Data Item".


That's All for Today! I hope You like and understand whatever I have written. If you find any error don't forget to mention it in the comment section or mail me. 💗💗

Note:- I learned this from "Data Structure using C" Book written By Reema Thareja.
FB COMMENTS ()