/*
struct ListNode {
int val;
struct ListNode *next;
ListNode(int x) : val(x), next(NULL) {}
};*/
class Remove {
public:
bool removeNode(ListNode* pNode) {
// write code here
if (!pNode->next ) return false;
pNode->val = pNode->next->val;
pNode->next = pNode->next->next;
return true;
}
};

京公网安备 11010502036488号