Data Structures

Trees

What is a Tree? A Tree is a hierarchical data structure composed of nodes connected by edges. It has a root node and zero or more subtrees, each with its own subtree structure. Unlike arrays or linked lists, trees are non-linear, offering a more diversified set of use-cases. Structure of a Tree Example: Types of […]

Trees Read More »

Dynamic Array

A Dynamic Array is an array data structure that automatically resizes itself when it reaches capacity. Unlike static arrays, which have a fixed size, dynamic arrays can grow or shrink as needed. Why Use Dynamic Arrays? Java Implementation Here is a simple implementation of a dynamic array in Java: Dynamic arrays are versatile and easy

Dynamic Array Read More »

Linked List Data Structure

Linked List

A Linked List is a data structure used for storing collections of data. Unlike an array, which stores data contiguously in memory, a Linked List stores references to its elements. A single element in a Linked List, typically called a “node,” holds both the data and a reference (or “link”) to the next node in

Linked List Read More »

Array Data Structure Guide

Arrays

One of the most basic yet powerful data structures you’ll come across is the Array. This guide will give you a clear understanding of arrays, their importance, and how to use them. What’s an Array? An array is a collection of items, usually of the same type, stored in contiguous memory locations. It is a

Arrays Read More »