A stack is LIFO (Last-In First Out) structure. In contrast, a queue is a FIFO (First-In First-Out ) structure. In a FIFO data structure, the first element added to the queue will be the first one to be removed. This is equivalent to the requirement that once a new element is added, all elements that [...]
Binary Search Trees (BSTs) are an important data structure for dynamic sets. Binary trees offer short paths from root. A node has up to two children that is why it is called binary tree. Data in binary tree is organized by value. A node in binary tree has following elements: A key (value) an identifying field inducing a total ordering; left pointer to a left child (may be NULL); right pointer to a right child (may be NULL); p pointer to a parent node (NULL for root).
The purpose of this tutorial is to present you the manner in which data is organized and represented and to get familiarized with important, most often used and efficient data structuring techniques. After completion of this tutorial, you will be equipped with data organization mechanisms enabling you to write simple, clear, and efficient programs. This is [...]
Data structures is the logical arrangement of data as used by a system for data management. A collection of data elements whose organization is managed by the operations that are used to store and retrieve the individual data elements. More specifically, a data structure is a collection of fundamental types (like integers, floating point numbers, characters [...]
Graph traversal refers to the problem of visiting all the nodes in a graph in a particular manner. Typically, in graph the problem is to find path between two nodes of the graph (e.g., Austin and Washington). There are two different methods for graph search: Breadth-First-Search (BFS) which search the siblings first and then moves on to find child or [...]
A data structure that consists of a set of nodes (vertices) and a set of edges that relate the nodes to each other. The set of edges describes relationships among the vertices. Array-based implementation can be a 1-D array is used to represent the vertices while a 2-D array (adjacency matrix) is used to represent the edges.
Array [...]
A data structure that consists of a set of nodes (vertices) and a set of edges that relate the nodes to each other. The set of edges describes relationships among the vertices. As a formal definition, a graph G is defined as follows:
G=(V,E) V(G): a set of vertices E(G): a set of edges (pairs of [...]
Heap is a specialized tree-based data structure that satisfies the heap property that if B is a child node of A, then key(A) ≥ key(B). This implies that an element with the greatest key is always in the root node.
It is a binary tree with the following properties:
Property 1: it is a complete binary tree [...]
A special kind of binary tree in which each leaf node contains a single operand. Each non-leaf node contains a single binary operator. The left and right subtrees of an operator node represent subexpressions that must be evaluated before applying the operator at the root of the subtree.
The levels of the nodes in the tree indicate their [...]
When we store ordered data in an array, we have a very efficient search algorithm, i.e. the binary searching. However, we have very inefficient insertion and deletion algorithms that require shifting data in the array. To provide efficient insertions and deletions, we developed the linked list. The problem with linked lists, however, is that [...]
Popular Posts (last 30 days)
- Attendance Management System 1473 view(s)
- Advanced Java Tutorial (For Intermediate) 776 view(s)
- JAVA Graphical User Interface (GUI) 733 view(s)
- Graph Implementation in C++ 529 view(s)
- File Handling using Input-Output Streams in Java 504 view(s)
- Linked lists in C++ 487 view(s)
- Sockets and Network Programming in Java 407 view(s)
- UDP Datagram Sockets in Java 406 view(s)
- Applications of Stack in data structures 401 view(s)
- Circular Linked Lists 359 view(s)
