class Solution {
public:
ListNode* deleteNode(ListNode* head, int val) {
ListNode* new_head = new ListNode(0);
new_head->next = head;
ListNode* cur = head;
ListNode* ptr = new_head;
while (cur != NULL && cur->val != val) {
ptr = cur;
cur = cur->next;
}
ptr->next = cur->next;
return new_head->next;
}
};
class Solution {
public:
bool isMatch(string s, string p) {
if(p.empty()) return s.empty();
bool match=!s.empty()&am