-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
12 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,33 @@ | ||
#ifndef NODE_H | ||
#define NODE_H | ||
#ifndef LIST_H | ||
#define LIST_H | ||
#include "Node.h" | ||
|
||
class List{ | ||
|
||
private: | ||
|
||
int* m_pList; | ||
Node* m_pList; | ||
int m_length; | ||
|
||
|
||
public: | ||
List(); | ||
~List(); //包括头节点,释放 | ||
~List(); //包括头节点,释放 | ||
// void deleteList(); | ||
void clearList(); //除了头节点,释放 | ||
void clearList(); //除了头节点,释放 | ||
void listTraverse(); | ||
bool listEmpty(); | ||
bool initList(); | ||
bool getElem(int i, int* e); | ||
bool priorElem(int* currentElem, int* preElem); | ||
bool nextElem(int* currentElem, int* nextElem); | ||
bool listInsert(int i, int* e); | ||
bool listDelete(int i, int* e); | ||
bool getElem(int i, Node* pNode); | ||
bool priorElem(Node* currentNode, Node* preNode); | ||
bool nextElem(Node* currentNode, Node* nextNode); | ||
bool listInsert(int i, Node* pNode); | ||
bool listDelete(int i, Node* pNode); | ||
bool listInsertHead(Node* pNode); | ||
bool listInsertTail(Node* pNode); | ||
int listLength(); | ||
int locateElem(int*e); | ||
int locateElem(Node* pNode); | ||
}; | ||
|
||
|
||
|
||
#endif // NODE_H | ||
#endif // LIST_H |