Queue ADT

Definition :- A queue is a collection of same type of entities, which ensures that all entities in collection will have a sequential storage structure that permits access only at the two ends of the sequence. We refer to the ends of the sequence as the front and rear. The first element in queue have the position as front and value or pointer or front changes according to the solution of the given problem. [Read More]

Introduction to Heap

Definition of a heap A heap is a data structure that contains objects which have comparable keys. Uses of Heap Some uses for a heap include: keeping track of employee records where the social security number is the key, network edges, events where there is a priority, etc. Such a heap is called descending heap. In an ascending heap, on the other hand, the key value stored in a node is smaller than the keys of its children nodes. [Read More]

What is a Graph data structure?

Graphs consist of 2 ingredients : Vertices (V) , also called nodes and can be pictured as dots Edges (E) , the line connecting the nodes. Types of Graphs Depending on the edges, there two types of graphs: Undirected Graphs - A graph that entail edges with ordered pair of vertices, however it does not have direction define. Example of such a graph is the ‘Family tree of the Greek gods’ **Directed Graphs (**aka Arcs) - Directed Graph: A graph that entail edges with ordered pair of vertices and has direction indicated with an arrow. [Read More]

Link list ADT

What is linked list? Linked List consists of a sequence of nodes. These nodes are made-up of the following: A Data Field for housing the data item One or Two Reference/s for pointing at other node/s i.e. pointing to the next/previous node/s. In this data structure, the nodes are allowed to be inserted and removed at any point in the list in constant time, however random access in not possible. [Read More]

Trie ADT

TRIE is an interesting data-structure used mainly for manipulating with Words in a language. This word is got from the word retrieve. TRIE (pronounced as ‘try’) has a wide variety of applications in Spell checking Data compression Computational biology Routing table for IP addresses Storing/Querying XML documents etc., We shall see how to construct a basic TRIE data structure in Java. The main abstract methods of the TRIE ADT are, [Read More]

Stack ADT

Stacks are an elementary Data Structure where all interaction with the data is done through the looking at the first element. Stacks are last in first out (LIFO) data structures. It is named on the basis of how the elements are removed from it. Opposite to stack is queue, in which the last element is removed, the element which was most old item, and hence it is FIFO or first in first out data structure. [Read More]