First Upload
This commit is contained in:
34
18 - Lists/ex2.c
Normal file
34
18 - Lists/ex2.c
Normal file
@@ -0,0 +1,34 @@
|
||||
#include "Lib.h"
|
||||
|
||||
//-----------------------------------------------------------
|
||||
// RemoveDuplicate
|
||||
// ---------------
|
||||
//
|
||||
// General : The function deletes the number of
|
||||
// repetitive characters and returns a list
|
||||
// that comes one instance of each character
|
||||
//
|
||||
// Parameters : **manager - pointer linear Linked List(IN)
|
||||
//
|
||||
// Return Value : None
|
||||
//
|
||||
//------------------------------------------------------------
|
||||
// Programer : Cohen Idan
|
||||
// Student No. : 211675038
|
||||
// Date : 12.12.2019
|
||||
//------------------------------------------------------------
|
||||
LLL * RemoveDuplicate(LLL ** manager)
|
||||
{
|
||||
unsigned short arr[TEN] = { ZERO };
|
||||
LLL * pos = *manager;
|
||||
while ((*pos).next != NULL)
|
||||
{
|
||||
(arr[(*(*pos).next).value.int_] == ONE) ? DeleteList(pos) : arr[(*(*pos).next).value.int_]++;
|
||||
pos = (*pos).next;
|
||||
}
|
||||
}
|
||||
|
||||
void main(void)
|
||||
{
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user