Data Structure and its operations

Data Structure and its operations

Data are simple values or sets of values. A data item refers to a single unit of suitable for communication, interpretation or processing by human or automatic means is called data. Example: Name, Age, Date and time.

Data Structure: Data may be organized in many different ways the logical or mathematical model of a particular organization of data is called a data structure. General data structure types include the array, the file, the record, the table, the tree, and so on.

In computer programming, a data structure may be selected or designed to store data for the reason of working on it with different algorithms. Algorithms transform data into something a program can effectively use. It represents the knowledge of data to be organized in memory.

Data structures are classified into two types such as linear or non-linear.

  • Linear: The elements of linear data structure represents by means of sequential memory locations.
  • Non-linear: A data structure is said to be non-linear if its elements a hierarchical relationship between elements such as trees and graphs.

The 6 major operations of a data structure are:

(i) Traversing: Traversing means accessing each record exactly once so that certain items in the record may be processed. Accessing each record exactly once so that certain items in the record may be processed.

(ii) Searching: Finding the location of the record with is given key value is called searching.

(iii) Inserting: Inserting means adding a new record to the structure.

(iv) Deleting: Deleting means removing a record from the structure

(v) Sorting: Sorting means arranging the record in some logical order. Arranging data elements of a data structure in a specified order is called sorting.

(vi) Merging: Merging means combining the records in two different sorted files into a single sorted file. Combining elements of two similar data structures to form a new data structure of the same type, is called merging.

Share This Post