Task 2 : Linked List Introduction
- FORK this repositori ASD_Task_2 to your GitHub account
- CLONE ASD_Task_2 repository from YOUR OWN ACCOUNT
- open and modify codes in *.cpp and *.h files inside project ASD_Task_2
- write your code inside the provided space in each functions/procedures
- COMMIT and PUSH your project to your account
- create a Pull Request
Create a program to store and manage a data using single linear linked list
- TODO: Define the elmlist and list data structure
- Define functions and procedures of single linked list [already done for you]
function allocate(in: x : infotype) : addressprocedure deallocate( i/o: P : address )procedure insertFirst( i/o: L : List, i: P : address )procedure insertLast( i/o: L : List, i: P : address )procedure insertAfter( i/o: L : List, i: Prec : address, P : address )procedure deleteFirst( i/o: L : List, i/o: P : address )procedure deleteLast( i/o: L : List, i/o: P : address )procedure deleteAfter( i/o: L : List, i: Prec : address, i/o: P : address )function findElm( i: L : List, x : infotype ) : addressprocedure printInfo( i: L : List )
TODO: Implement all functions and procedures defined in list.h
procedure insert_sorted( i/o : L : List, x : infotype )- TODO: insert x into an already sorted-by-ID list L so that
- the list is sorted ascending order
- no duplicate number in the List
- allocate new element only if the conditions are met
- TODO: insert x into an already sorted-by-ID list L so that
Implement function and procedure defined in operation.h
TODO: Run main.cpp to check your implementation