• Welcome to Web Hosting Community Forum for Webmasters - Web hosting Forum.
 

Recommended Providers

Fully Managed WordPress Hosting
lc_banner_leadgen_3
Fully Managed WordPress Hosting

WordPress Theme

Divi WordPress Theme
WPZOOM

Forum Membership

Forum Membership

Data structure and its types

Started by grofee, April 29, 2022, 05:44:47 PM

grofee

Data structure is a storage that is used to store and organize data. It is a way of arranging data on a computer so that it can be accessed and updated efficiently.
Types of Data Structure
1. Array
2. Graphs
3. Hash Tables
4. Linked List
5. Stack
6. Queue
7. Tree
8. Trie

Akshay_M

Data structures is a way of organizing and storing the data in a computer so that it can be accessed and modified efficiently. The main idea is to reduce the space and time complexities of different tasks.

Types of data structures :


Arrays :

Array is a data structure used to store homogeneous elements at contiguous locations. Size of an array must be provided before storing data.

Linked List :

A linked list is a linear data structure (like arrays) where each element is a separate object. Each element (that is node) of a list is comprising of two items – the data and a reference to the next node.

Types of Linked List :

Singly Linked List

Doubly Linked List

Stack :

A stack or LIFO (last in, first out) is an abstract data type that serves as a collection of elements, with two principal operations: push, which adds an element to the collection, and pop, which removes the last element that was added. In stack both the operations of push and pop takes place at the same end that is top of the stack. It can be implemented by using both array and linked list.

Queue :

A queue or FIFO (first in, first out) is an abstract data type that serves as a collection of elements, with two principal operations: enqueue, the process of adding an element to the collection.(The element is added from the rear side) and dequeue, the process of removing the first element that was added. (The element is removed from the front side). It can be implemented by using both array and linked list.

Tree :

A tree data structure can be defined recursively (locally) as a collection of nodes(starting at a root node), where each node is a data structure consisting of a value, together with a list of references to nodes (the "children"), with the constraints that no reference is duplicated, and none points to the root.

Graph :

A Graph is a non-linear data structure consisting of nodes and edges. The nodes are sometimes also referred to as vertices and the edges are lines or arcs that connect any two nodes in the graph.