Saturday, 26 August 2017

Operation on Data Structure

The data in the data structures are processed by certain operations. The particular data structure chosen largely depends on the frequency of the operation that needs to be performed on the data structure.

The basic operations that are performed on data structures are as follows:

1. Creation: When creating a data structure the total amount of memory required to store the data must be described.

2. Insertion: Insertion means the addition of new data element into the previously created data structure. Insertion can be done at following places:
  • Inserting an element at beginning
  • Inserting an element at ending
  • Inserting an element at user choice.

3. Deletion: Deletion means removing an element from the record or the data structure. Deletion can take place at following places:
  • Deletion at beginning
  • Deletion at ending
  • Deletion at user choice.

4. Traversing: Traversing means processing all the data elements present in the data structure at least once. Traversing can be done in following ways:
  • Forward traverse
  • Backward traverse

5. Searching: Searching is used to find the location of an element in the data structure with the help of a given key value. It is also used to check if an element is present in the data structure or not.
Searching can be done using following types.
  • Linear search
  • Binary search

No comments:

Post a Comment