Data Structures & Algorithms


Arrays

An array is a collection of elements stored at contiguous memory locations...

arr = [1, 2, 3, 4]
print(arr[0])  # Output: 1

Linked Lists

A linked list is a linear data structure where elements are not stored contiguously...

struct Node {
    int data;
    struct Node* next;
};
Table of Contents