shithub: rott

ref: dfde0077ffe7670c8119fe03bd33b7ea09c5a791
dir: /src/LinkedList.h/

View raw version
/* 
 * File:   LinkedList.h
 * Author: LTCHIPS
 *
 * Created on March 19, 2018, 3:40 PM
 */

#ifndef LINKEDLIST_H
#define LINKEDLIST_H

#ifdef __cplusplus
extern "C" {
#endif

typedef struct listNode 
{
    int key;
    int data;
    struct listNode * next;
} listNode;

typedef struct LinkedList
{
    int NumOfItems;
    int IsInit;
    struct listNode * head;
} LinkedList;

int SearchWithKey(LinkedList *, int);

void InitLinkedList(LinkedList*);

void InsertInList(LinkedList*,int, int);

void DeleteAtIndex(LinkedList*,int);

void DeleteWithKey(LinkedList*,int);

void DestroyList(LinkedList*);


#ifdef __cplusplus
}
#endif

#endif /* LINKEDLIST_H */