摸不着头脑
class Solution {
public:
bool isPalindrome(ListNode* head) {
vector<int>a;
while(head)
{
a.push_back(head->val);
head=head->next;
}
int e=a.size()-1,b(0);
while(b<e)
{
if(a[e]!=a[b])
{
return 0;
}
++b;
--e;
}
return 1;
}
};