link List

Write your question here.
hey can someone tell me if its good ..
my qustion is in link list no data will repeat it self
1-4-7-1-8
will be
1-4-7-8
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
 void set(Node * head){
Node *temp,prev;
Node *current=head;
Node* runner;
runner=current->next;
while(runner!=Null){
if(current->data==runner->data){
temp=runner;
runner=runner->next;
prev->next=runner;
break;
}
else{
prev=runner;
runner=runner->next;
}
if(runner==null){
current=current->next;
runner=current->next;
}
delete temp;
Topic archived. No new replies allowed.