Search the List
public static boolean search(IntNode front, int target) {
for (IntNode ptr=front; ptr != null; ptr=ptr.next) {
if (target == ptr.data) {
return true;
}
}
return false;
}
public static boolean search(IntNode front, int target) {
for (IntNode ptr=front; ptr != null; ptr=ptr.next) {
if (target == ptr.data) {
return true;
}
}
return false;
}