Data Structure:

Natasha Javed
Nov 3 · 2 min read

Data structure can be defined as the group of data elements which provide an efficient way of storing and organizing data. OR Data structure is a procedure of organizing , processing retrieving and storing data.Data structure is designed to arrange data to suit a specific purpose so that it can be accessed and worked with in appropriate ways.

In computer programming, a data structure may be selected or designed to store data for the purpose of working on it with various algorithms.

Each data structure contains information about the data values, relationships between the data and functions that can be applied to the data.

Characteristics of data structures

Data structures are often classified by their characteristics. Possible characteristics are:

  • Linear or non-linear: This characteristic describes whether the data items are arranged in chronological sequence, such as with an array, or in an unordered sequence, such as with a graph.
  • Homogeneous or non-homogeneous: This characteristic describes whether all data items in a given repository are of the same type or of various types.
  • Static or dynamic: This characteristic describes how the data structures are compiled. Static data structures have fixed sizes, structures and memory locations at compile time. Dynamic data structures have sizes, structures and memory locations that can shrink or expand depending on the use

Types of data structure:

Array:An array stores a collection of items at adjoining memory locations. Items that are the same type get stored together so that the position of each element can be calculated or retrieved easily. Arrays can be fixed or flexible in length.

Stack:A Stack is an abstract data type or collection where in Push,the addition of data elements to the collection, and Pop, the removal of data elements from the collection, are the major operations performed on the collection. The Push and Pop operations are performed only at one end of the Stack which is referred to as the ‘top of the stack’.In other words,A stack stores a collection of items in the linear order that operations are applied. This order could be last in first out (LIFO) or first in first out (FIFO).

Queues- A queue stores a collection of items similar to a stack; however, the operation order can only be first in first out.

Linked List: A linked list stores a collection of items in a linear order.Each element , or node , in a linked list contains a data items as well as a reference ,or link , to the next item in the list.

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade