Function to check if pair with given product exists in the list Takes head pointer of the linked list and product
static boolean check_pair_product ( Node head , int prod ) { Vector < Integer > s = new Vector < Integer > ( ) ; Node p = head ; while ( p != null ) { int curr = p . data ;