35 lines
934 B
C
35 lines
934 B
C
#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)
|
|
{
|
|
|
|
}
|