Skip to content

LaoTsai8814/Generic-Linked-List

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

LCEZ Generic Linked List

Warning !!!

This is a demonstration of generic linked list

It will not be maintaining in the future

Why would I do this project?

  • Create a linked list quickly and easily
  • Multiple different variable types can be placed in a linked list

How to use

demo

#include "Linkinglistc.h"

int main()
{
  DualWay* head = create_list();// <-- Create The Linked List
  head = menu(head);// <-- Test Function   < Create And print the value

  //free the list
  while(head)
  {
    DualWay* temp = head;
    head = hand->next;
    free(temp->value);
    free(temp);
  }
  return 0;
}

All Function

  • create a head with a head node
DualWay* create_list()
  • calculate the length of the linked list
int list_length(DualWay* head)
  • print all data from the linked list
void print_all(DualWay* head)
  • get the data from the specific index
DualWay* GOTO_Index(DualWay* head,int index)
  • add node to the linked list
DualWay* add_node(DualWay* current, char side)
  • delete node from the linkled list
DualWay* delete_node(DualWay* head, DualWay* target)
  • modify the data in the linked-list
void modify_data(DualWay* node, DataType type)
  • demo the menu of the linked list function
DualWay* menu(DualWay* head)

About

this is a good good!! lib !!!

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages