class Solution {
public:
bool isPalindrome(ListNode* head) {
vectorv;
bool out=0;
while(head){
v.emplace_back(head->val);
head=head->next;
}
int n=v.size();
for(int i=0;i
if(v[i]!=v[n-i-1])return 0;
}
return 1;
}
};



