Data structure-Single linked list (c description)

Source: Internet
Author: User

List.h

typedef int ElementType;
#ifndef list_h_included
#define List_h_included
struct Node;
typedef struct NODE *ptrtonode;
typedef ptrtonode List;
typedef ptrtonode Position;
List createlist ();
void Disposelist (List L);
List Makeempty (list L);
int IsEmpty (List L);
int Islast (Position P, List L);
Position Find (ElementType X, List L);
void Delete (ElementType X, List L);
Position findprevious (ElementType X, List L);
void Insert (ElementType X, List L, Position P);
void DeleteList (List L);
void Setadvance (Position P, Position nextp);
Position Header (List L);
Position (List L);
Position Advance (Position P);
ElementType Retrieve (Position P);
#endif//list_h_included

Fatal.h
#ifndef fatal_h_included
#define Fatal_h_included
#include <stdio.h>
#include <stdlib.h>
#define ERROR (str) fatalerror (str)
#define FATALERROR (str) fprintf (stderr, "%s\n", Str), exit (1)
#endif//fatal_h_included

List.c

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.