Skip to content

Elemental Strucutres

João Medeiros edited this page May 23, 2023 · 2 revisions

Introduction

Lists

typedef struct list_node
{
    int info;
    struct list_node *next;
} list_node_type;
typedef struct list_node
{
    struct list_node *prev;
    int info;
    struct list_node *next;
} list_node_type;

Binary Trees

typedef struct tree_node
{
    int info;
    struct tree_node *lchild;
    struct tree_node *rchild;
} tree_node_type;

Balanced Trees

typedef struct tree_node
{
    struct tree_node *parent;
    int info;
    unsigned int height;
    struct tree_node *lchild;
    struct tree_node *rchild;
} tree_node_type;

Hash Tables

Clone this wiki locally