This commit is contained in:
krahets
2023-04-22 01:35:51 +08:00
parent 263c979237
commit 881ece517f
9 changed files with 87 additions and 67 deletions

View File

@@ -1043,6 +1043,8 @@ comments: true
struct doublyListNode *prev; // 前驱节点
};
typedef struct doublyListNode doublyListNode;
/* 构造函数 */
doublyListNode *newDoublyListNode(int num) {
doublyListNode *new = (doublyListNode *)malloc(sizeof(doublyListNode));
@@ -1063,6 +1065,8 @@ comments: true
int queSize; // 双向队列的长度
};
typedef struct linkedListDeque linkedListDeque;
/* 构造j */
linkedListDeque *newLinkedListDeque() {
linkedListDeque *deque = (linkedListDeque *)malloc(sizeof(linkedListDeque));
@@ -2166,6 +2170,8 @@ comments: true
int queCapacity; // 队列容量
};
typedef struct arrayDeque arrayDeque;
/* 构造函数 */
arrayDeque *newArrayDeque(int capacity) {
arrayDeque *deque = (arrayDeque *)malloc(sizeof(arrayDeque));