Comparison between sequential list and single linked list (XII)
We have previously learned the relevant features of linear tables and single linked lists. In this section of the blog, let's take a look at the differences between them. First of all, a question is raised: how to determine whether a data element exists in a linear table? That must have gone through it directly. Let's take a look at the code.
# include # include "LinkList.h" using namespace std;using namespace DTLib;int main () {LinkList list; for (int iTun0; inext; delete toDel;} m_length = 0;} ~ LinkList () {clear ();}};} # endif / / LINKLIST_H
Then the main.cpp can be written like this.
# include # include "LinkList.h" using namespace std;using namespace DTLib;int main () {LinkList list; for (int iTuno; I)