Thursday, January 7, 2016

What is Data Structure in Java?

Definition:
 A Data Structure is the way Organizing the data elements in computer memory in a manner that is convenient    to perform operation on it.Here Data  is a combination of numeric and non-numeric values. Structure is representation of data in meaningful order.Data Structure are used to represent numeric and non-numeric in a meaningful order.

Goal of Data Structure:

The Goal of Data Structure is to organizing the data.

Functions of DS:

The main functions of DS are 

  • allocation of memory such as Add/create
  • Deallocation of memory such as Delect/destroy
  • Accessing data elements such as get/selction
  • Modify and store such as  change/updation


Data Structure are divided into mainly two types. They are

a) Primitive Data Structures
b) non-primitive Data Structures





Primitive Data Structure:

In Primitive DS the features are access directly from the system. The Primitive Data Structures are int ,float,char etc..

Non-Primitive DS:

In Non-primitive DS the features are access indirectly from the system. The non primitive data structures are Arrays, Stacks,Queues,linked list etc...

The Non-primitive Data Structure are divided into Two types. They are

1)Linear Data Structure
2)Non-Line Data Structure

1) Linear Data Structure:

In this all the elements are arranged in a Sequential Order.

Ex: Arrays, Stacks, queues,Linked Lists....

In Data Structure the linear Data Structure are again divided into two types. They are

a) Linear Array:
b) Linear Linked List

a)Linear Array:  In Linear Array the relationship between the elements are maintained by using the sequential memory locations.

b)Linear Linked List: In Linear Linked List the relationship between the elements maintained by using pointer (or) Links.


2)Non Linear Data Structure:

 In this all the elements are arranged in a Non- Sequential order (or) Hierarchical Order

Ex:  Trees, Graphs





Data Structures Operations:


Data Structures Provides 7 types of Operations for developing the applications (or) arrange the data  in specific Order. They are

a) Creations
b)Insertion
c)Traversing
d)Deletion
e)Searching
f)Sorting
g)Merging

a) Creation: 
Creation refers to create an array(List) and also to read elements into the array (or)List.

b) Insertion:

It means insert into a new element at a particular position into the list

c) Traversing:

It means to display each and every element in the list

d) Deletion:

It means delete an element from the list

e) Searching:

It means searching (or) finding a particular position element in  the List.

f) Sorting:

It means arrange the elements in the particular order,that means either in ascending or descending order.

g) Merging:

It means combining the two sorted lists into a single list.




  

No comments:

Post a Comment

High Paying Jobs after Learning Python

Everyone knows Python is one of the most demand Programming Language. It is a computer programming language to build web applications and sc...