Learn Basic Tutorial on Data Structure

Data Structure and Algorithm Tutorial
Written by anjali

Learn Basic Tutorial on Data Structure

 Data Structure?

Data Structure which is used to store and organize  data in our device so they can be used effectively and efficiently. Data structures’  benefit is that they reduce time and spatial complexity.The most advantage of data structure  which uses the minimum amount of memory and processes data quickly.

It makes the data on a computer to make it easily accessible and up to date. It is also used in  data processing, retrieval, and storing data.

Advantage of Data Structure

DataStructure helps to store data in less space and also in less time . It offers abstraction and reusability. When the task is executing like data processing, retrieval, or storage, it use right data structures which can make  programmers  to complete task in less time.

Data structure offers a method for effectively managing, organising, and storing data.  Data structures offer productivity, reuse, and abstraction. Because storing and retrieving user data as quickly as feasible is a program’s primary job, it plays a significant role in improving performance.

Read About:HTML 

Types of Data Structure

There arre two types of Data Structure:

  • Primitive Data Structure
  • Non – Primitive Data Structure

Primitive Data Structure:Primitive data structures that can only carry one value include data types like int, char, float, double, and pointer.

Non Primitive Data Structure:Complex data structures that are descended from primitive data structures are known as non-primitive data structures. Two types of non-primitive data types are:

  • Linear Data Structure
  • Non – Linear Data Structure

Linear Data Structure:Each data element in a linear data structure is connected to the element before it and the element after it in a consecutive order.. Here memory is additionally sequential, implementing such data structures is simple. List, Queue, Stack and Array .

Types of Linear Data Structure:

1.Array:An array is a group of related data elements kept in close proximity to one another in memory. The way to retrieve each data element directly is by using its index number.

2.Linked List:  Linked list is a linear data structure It is a collection of nodes that are not kept in the same place at the same time. Pointers are used to connect each node in the list to the node that is immediately adjacent to it.


3.Stack:Stack is a linear data structure .It’s performs FILO (First In Last Out) or LIFO (Last In First Out).

Basic operations of Stacks are:

Push-Adds a new object to the stack.
Pop – Removes an item from the stack by deleting it.
Top – Returns the stack’s topmost member.
IsEmpty-The stack is empty if the IsEmpty function returns true.

4.Queue:A linear data structure called a queue allows elements to be added from only one end, known as the rear, and discarded from the other end, known as the front. The FIFO (First In First Out) order is used.

1.Adds a new element to the queue using deque.
2.Enqueue: Removes an element from the queue by deleting it.
3.If the queue is full, the IsFull method returns true.
4.If the queue is empty, the IsEmpty method returns true.

Non Linear Data Structure:

Non Linear data structures can occasionally be explored in more than one run and offer multi-level storage. Although difficult to create, such data structures are more effective in using memory. Tree, BST, Graphs, and other non-linear data structures are a few examples.

Types of Non Linear Data Structure:

1.Tree:A set of nodes is the definition of a tree, a hierarchical data structure. The nodes at the top and bottom are referred to as root nodes and leaf nodes, respectively. There is only one parent for each node, although there may be several children.

Types of Tree:

  • General Tree
  • Binary Tree
  • Binary Search Tree
  • AVL Tree
  • Red Black Tree
  • N-ary Tree

2.Graph:A group of objects connected by edges are represented graphically in a graph. Vertices are the points that symbolise the interconnected nodes, and edges are the connections between them.

Types of Graph:

  • Finite Graph
  • Infinite Graph
  • Trivial Graph
  • Simple Graph
  • Multi Graph
  • Null Graph
  • Complete Graph
  • Pseudo Graph
  • Regular Graph
  • Bipartite Graph
  • Labeled Graph
  • Diggraph Graph
  • Subgraph
  • Connected or Disconnected Graph
  • Cyclic Graph
  • Vertex Labelled Graph
  • Directed Acyclic Graph

Classification of Data Structure

Two Types:

1.Static Data Structure:Data structures known as static data structures have their size allocated at the time of compilation. As a result, the maximum size is fixed and cannot be changed.

2.Dynamic Data Structure:Data structures known as dynamic data structures have their size allocated in run time. As a result, the maximum size is flexible and can be changed as needed.


Usage of Data Structure:

1.It helps to store the data on hard disks
2.The programme is more effective when the ADT (Abstract Data Type) is chosen appropriately.
3.For the creation of effective algorithms, data structures are required.
4.It offers abstraction and reusability.
5.When executing tasks like data processing, retrieval, or storage, using the right data structures can help programmers get the job done faster.
6.Large volumes of data are easier to manipulate.

Applications of Data Structure

1.Data storage in a computer’s memory is organised.

2. Information representation in databases

3. Computer programmes that browse data (such as a search engine)

4. Data manipulation algorithms (such as a word processor)

5. Data analysis software (such as a data miner)

6. Algorithms for producing data (such as a random number generator)

7. Data compression and decompression techniques (such as a zip utility)

8. Data encryption and decryption methods (such as a security system)

9. File and directory management software (such as a file manager)

10. Graphics-rendering software (such as a web browser or 3D rendering software)

Also Read:Data Structure

About the author


Leave a Comment