Non Primitive Data Structures | Primitive Data Structures
In this article non primitive data structures we give the information about type of non primitive data structures such as linear and non linear data structure, abstract data type in data structure.
Data structure is a way to store and organize data in a computer system. So that we can use the data easily. That is, the data is stored and organized in such a way that it can be easily accessed later at any time.
Data Structure is not a programming language like C, C++, Java, but it is a set of algorithms that we use to structure data in programming languages.
Data structure is a main part of many computer science algorithms by which programmers can handle data well. It plays a very important role in improving the performance of the program or software.
There are two types of data structure:-
1. Primitive Data Structures
2. Non-primitive Data Structures
Primitive Data Structure: –
Primitive data structure is that data structure which can be operated directly from machine instructions. That is, it is defined by the system and the compiler.
Non-primitive data structure: – A primitive data structure is a data structure that cannot be operated by direct machine instructions. These data structures are derived from primitive data structures.
There are two types of non-primitive data structures:-
1:-Linear Data Structure
1:- Linear data structure
Linear is a data structure in which data items are stored and arranged in a linear form, with one data item connected to another as a line.
ex:- array, linked list, queue, stack.
2:- Non-linear data structure
Non-linear is a data structure in which data items are not arranged in a sequential manner.in which a data item can be associated with any number of other data items.
Advantage of data structure
- Through this we can store information on the hard disk. And we can use this information later.
- We can easily manage very large databases.
- It is very important for designing algorithms.
- Through this we can access and process data on the software system.
- It makes the processing of data very easy.
- We can access the data at any time from our laptop or mobile using the internet.
- If the programmer uses the right data structure, then he saves a lot of his time and along with this he is able to save storage and processing time as well.
- The data structure that is specified by the abstract data type (ADT) provides abstraction. Due to which the client cannot see the internal working of the data structure, so it does not need to worry about the working part. The client can only see the interface.
- The data structure provides reusability which means that the data structure can be used by many clients.
Disadvantage of Data Structure
- Only advance users can make changes in the data structure.
- If ever there is any problem in the data structure, then only expert can solve it. Basic users cannot solve this.
- If our data structure is very large, then many people are needed to maintain and create it. Due to which its cost (price) increases.
- Searching – The process of finding an element is called searching. There are two algorithms to complete the search, first binary search and second linear search.
- Sorting – The process of arranging the data structure in a particular order is called sorting. There are many algorithms to perform sorting such as – insertion sort, selection sort, bubble sort, radix sort etc.
- Insertion – The process of adding elements to a location is called insertion. If the size of a data structure is n, then we can insert only n-1 elements in it.
- Deletion – The process of removing an element is called deletion. We can delete data from any location.
- Traversing – Traversing means to traverse each element of the data structure to perform a particular task.
- Merging – Joining two such lists which have same type of data elements together is called merging. From which we get a third list.
Characteristics of Data Structure:-
- It is a group of operations which are performed in data items such as:- searching, sorting etc.
- It describes how the data items are related to each other.
- The execution time of data structure operations should be as short as possible.
- The memory usage of its operations should be as low as possible.
- It should implement the interface correctly.
- Object Oriented Programming Using C++ |BCA Semester II |History of C++
- Core Java Programming | BCA Part III | SEM-VI | What is Java
- Computer Fundamentals Notes | Computer Fundamentals Tutorial
- DOT NET Technology Tutorial | ASP.NET Tutorial for Beginners