class Node {
public:
int value;
Node* next = NULL;
};
bool find(Node* node, int element) {
if(node -> value == element) return true;
else if(node -> value) return find(node -> next, element);
else return false;
}
Failed test #1. Wrong answer
Input:
2
0 -> 1 -> 2 -> 3 -> 4 -> 5
Your output:
false
Correct output:
true