Sponsored
Categories: Data StructureNotes

Explain different types of data structures.

Sponsored
Data structure means how the data is organized in memory. There different kind of data structures. Some are used to store the data of same type and some for different types of data. Different types of data structures help different types of operations of data structures too. Data structure is a particular way of storing and organizing data in a computer so that it can be used efficiently.

Different Types of Data Structures:

Arrays:

The simplest type of data structure is a linear array. It means a list of finite number n of elements referenced respectively by a set of n consecutive numbers, usually 1,2,3,…,n. If we choose the name A for the array then the elements of A are denoted by subscript notation as a1, a2, a3,…, an , or by parenthesis notation A(1), A(2), A(3),…, A(n) or by bracket notation A[1], A[2], A[3],… ,A[n]. For example, considering the following array named STUDENTS containing 6 student names,

STUDENTS

1

Tanmay

2

H

3

E

4

A

5

B

6

C


Here, STUDENTS[1] = Tanmay, STUDENTS[2] = H and so on.

Linked List:

In computer science, a linked list is a data structure that consists of a sequence of data records such that in each record there is a field that contains a reference (that is, a link) to the next record in the sequence. In other words, A simple linear data structure, each of whose nodes includes pointers to the previous and subsequent nodes in the list, enabling traversal of the structure from any starting point. For example, considering following two lists.


These are list of patients and doctors indicating which patient met which doctors and which doctors saw which patient. For example, if we select Tanmay then the corresponding pointers are 1 and 3 and these are the index number of the Doctor list. Thus, Tanmay met S and N. Again if we select Sh from the Doctor list, it has 4,5 and 6 and these are the index of the patient list, thus Sh saw the patients B, C and D.

Trees:

Data frequently contain a hierarchical relationship between various elements. The data structure which reflects this relationship is called a rooted tree graph or simply a tree. This is sometimes like the properties of an object. For example, properties to store of an employee in the office directory can be name, age, sex, salary etc. Again the properties “name” can have sub-properties like first name, middle name, last name etc. This can be showed as follows.

Read More: What is Tree in Data Structure? Explain different types of trees.




Continue Reading to the next part.

Stack:

A stack, also called a Last-In-First-Out (LIFO) system, where insertion and deletion can take place only at one end called the top. This structure is similar in its operation to stack of dishes in a spring system as in the following figure.



Queue:

A queue, also called a First-In-First-Out (FIFO) system is a linear list where deletions will take place only at the front end and insertions will take place only at the rear end. In the following figure we can see a pipe with two ends, left end is the rear end and right end is the front end. We are inserting some balls and those balls can only be inserted from the rear and they can come out (deletions) from the front end.

Sponsored
Share
Tanmay Chakrabarty

Tanmay Chakrabarty is a professional web application developer working professionally for 7+ years with experience in both local and global projects. He likes to share helpful contents such as Q/A, development tutorial etc. on this blog.

Recent Posts

Discuss the challenges and strategies for managing and mitigating software project risks.

Software Project Risk In software engineering, a project risk refers to any factor or event…

8 months ago

What is Object Oriented Programming? What are the advantages and disadvantages of Object Oriented programming?

Object-Oriented Programming (OOP) Object-Oriented Programming, commonly known as OOP, is a programming paradigm that revolves…

8 months ago

What is requirement engineering? Discuss the challenges and techniques involved in gathering and documenting software requirements.

Requirement Engineering: Requirement Engineering is a crucial phase in software development where we identify, gather,…

8 months ago

What are the 10 limitations or disadvantages of third generation of computers?

The third generation of computers, marked by the utilization of integrated circuits (ICs), brought about…

9 months ago

How Does CPU Contribute to the Overall Functionality of a Computer?

The Central Processing Unit (CPU) is often referred to as the "brain" of a computer.…

9 months ago

What are the fundamentals of database management systems and SQL?

Fundamentals of Database Management Systems (DBMS) and SQL Database Management Systems (DBMS) and Structured Query…

11 months ago
Sponsored