How to made Auto Sorting Singly Lingked List

So basicly i'm newbie..so i need a help and guide from some expert here
i want to make a list
in the list i will have ID,and NAME
and when i inserting the data(ID and NAME) it will sort by itself by the ID..

so may be will become like this (in this example i already have 2 data in the list that is
ID : 004 NAME :ALICE, ID:002 NAME :BOB and i want to insert new data)
Menu
1.Insert
2.Delete

Enter Your Choice : 1
Insert ID   : 001
Insert NAME : Cecile

THE LIST 
ID     NAME
001    Cecile
002    BOB
004    ALICE


and how to delete the data from the list so if i choose option 2 and delete BOB the list will be :

THE LIST
ID      NAME
001     Cecile
004     ALICE
Last edited on
Topic archived. No new replies allowed.