Help me in solving DSAAGP79 problem

My issue

runtime error

My code

// The structure of a LinkedList Node is defines as
// struct ListNode {
//     int value;
//     ListNode* next;
//     ListNode(int x) : value(x), next(NULL) {}
// };


int searchLinkedList(ListNode* head, int target) {
    // Write your code here   
}


Learning course: Data Structures and Algorithms
Problem Link: https://www.codechef.com/learn/course/dsa-detailed/DSAAG29/problems/DSAAGP79