Вы находитесь на странице: 1из 13

# An ordered set of data contained in the main memory.

A list structure in which each element, except the last, has a unique successor.

Linear List
Types and Sub-types of a Linear List
Linear List

General

Restricted

LIFO (Last-In-First-Out)

FIFO (First-In-First-Out)

## General Linear List

A structure in which the ordering of the elements is determined by linked fields. The link identifies the next element in the list.

1. Singly-Linked List (SLIST) The simplest kind of linked list is a singly-linked list (or slist for short), which has one link per node. This link points to the next node in the list, or to a null value or empty list if it is the final node.

2. Doubly-Linked List A more sophisticated kind of linked list is a doubly-linked list or two-way linked list. Each node has two links: one points to the previous node, or points to a null value or empty list if it is the first node; and one points to the next, or points to a null value or empty list if it is the final node

3. Circularly-Linked List The first and final nodes are linked together. This can be done for both singly and doubly linked lists. To traverse a circular linked list, you begin at any node and follow the list in either direction until you return to the original node.

## Restricted Linear List

(Last-In-First-Out) A data structure processing sequence in which data are processed in the reverse order as they are retrieved.

(First-In-First-Out) A data structure processing sequence in which data are processed in the order that they are retrieved.

Stack
Last-In-First-Out

A stack is a linear list in which all additions and deletions of data are restricted to one end called TOP.

Stack of Coins

Stack of Books

Stack
Basic Operations of Stack

## Potential problem Overflow Underflow Underflow

Queue
First-In-First-Out

A queue is a linear list in which data can only be inserted at one end called the REAR, and deleted from the other end called the FRONT.

People in queue

Queue
Basic Operations of Queue

## Potential problem Overflow Underflow Underflow Underflow

Refrences
Data Structures: A Pseudocode Approach with C (2005), Richard f. Gilberg & Behrouz A. Forouzan

http://www.wikipedia.com