From Botched Stork, 5 Months ago, written in C.
Embed
  1. for(i=0;i<(listsize(*head)/2); i++)
  2. {
  3. if(current->value==tail->value){
  4. current=current->next;
  5. tail=tail->prev;
  6. }
  7. else {
  8. printf("nie palindrom");
  9. break;
  10. }}
  11. if(current->value==tail->value)
  12. printf("palindrom\n");