Function to check if pair with the given product exists in the list Takes head pointer of the linked list and product
bool check_pair_product ( struct Node * head , int prod ) { unordered_set < int > s ; struct Node * p = head ; while ( p != NULL ) { int curr = p -> data ;