struct ListNode* deleteNode(struct ListNode* head, int val ) {
    // write code here
    if(head->val==val) return head->next;
    else{
        struct ListNode* s=head;
        while(head->next!=NULL){
            if(head->next->val==val){
                head->next=head->next->next;
            }
            else{
                head=head->next;
            }
        }
        return s;
    }
}