hss
Well-Known Member
- تاريخ التسجيل
- 31 أكتوبر 2011
- المشاركات
- 94
- المجموعة
- أنثى
- الدفعة الدراسية
- معلومة خاصة
- الكلية
- كلية تقنية المعلومات
حليته الحين بس مو متأكد من انه شغال لو لا .. اهم شي الطريقة والفكرة
كود:void linkedlisttype<Type>::validate(); { if (first!=NULL) { newtype<Type> *current,*current2; current=first; int num=0; while)current!=NULL) { num++; current=current->link; } for(int i=0;i<=(num/2);i++) { current2=current->link; } bool found=false; while(current2!=NULL) { if (current->info==current2->info) found=true; else found=false; } if (found) { newtype<Type> *p; current=first; for(int j=0;j<(num/2);j++) { p=current; current=current->link; delete p; j++ } } else cout<<"Not equal"<<endl; }
خيو ممكن تشرح الفكرة بالكلام






هذي ما مرت عليي