class Solution {
public:
vector<int> printListFromTailToHead(ListNode* head) {
vector<int> s;
while(head!=NULL)
{
s.insert(s.begin(),head->val);
head=head->next;
}
return s;
}
};



京公网安备 11010502036488号