| 16 | bool isPalindrome(Node *head); |
| 17 | |
| 18 | int main() |
| 19 | { |
| 20 | |
| 21 | int T,i,n,l,firstdata; |
| 22 | cin>>T; |
| 23 | while(T--) |
| 24 | { |
| 25 | struct Node *head=NULL, *tail=NULL; |
| 26 | cin>>n; |
| 27 | cin>>firstdata; |
| 28 | head=new Node(firstdata);//Creating a new node |
| 29 | tail=head; |
| 30 | |
| 31 | //Inserting the new node into the linked list |
| 32 | for(i=1;i<n;i++) |
| 33 | { |
| 34 | |
| 35 | cin>>l; |
| 36 | tail->next=new Node(l); |
| 37 | tail=tail->next; |
| 38 | } |
| 39 | cout<<isPalindrome(head)<<"\n"; |
| 40 | |
| 41 | } |
| 42 | return 0; |
| 43 | } |
| 44 | |
| 45 | void reverse(struct Node**); |
| 46 | bool compareLists(struct Node*, struct Node*); |
nothing calls this directly
no test coverage detected