int seqSearch(int key); // this is a member function of the linkedListType class. It searches for the value key in the linked list. If the key is found, then its position is returned. Otherwise, -1 is returned. NOTE: in order to implement this function, you need to implement another private member function to send it the first pointer. Here is the prototype for the private member function:
int recSeqSearch(nodeType *p, int key);
#include <iostream>
using namespace std;
struct nodeType
{
int info;
nodeType *next;
};
class linkedListType
{
public:
linkedListType();
int listSize();
bool isEmpty();
int seqSearch(int);
void remove(int);
void insertFirst(int);
void insertEnd(int);
void insertAt(int, int);
void removeAt(int);
void print();
void clearList();
void insertOrdered(int);
void removeFirst();
void removeLast();
void removeLast2();
int removeOddSumEven();
~linkedListType();
private:
nodeType *first, *last;
int length;
};