feat(codes/c/): add array_stack and linkedlist_stack frame

This commit is contained in:
Gonglja 2023-01-12 21:09:51 +08:00
parent cbbb7d34b2
commit 153846c94b
5 changed files with 91 additions and 0 deletions

View file

@ -10,3 +10,4 @@ add_subdirectory(chapter_computational_complexity)
add_subdirectory(chapter_array_and_linkedlist)
add_subdirectory(chapter_sorting)
add_subdirectory(chapter_tree)
add_subdirectory(chapter_stack_and_queue)

View file

@ -0,0 +1,2 @@
add_executable(array_stack array_stack.c)
add_executable(linkedlist_stack linkedlist_stack.c)

View file

@ -0,0 +1,43 @@
/**
* File: array_stack.c
* Created Time: 2022-01-12
* Author: Zero (glj0@outlook.com)
*/
#include "../include/include.h"
struct ArrayStack {
int *array;
size_t stkSize;
};
typedef struct ArrayStack ArrayStack;
void new(ArrayStack* stk) {
}
size_t size(ArrayStack* stk) {
}
bool empty(ArrayStack* stk) {
}
void push(ArrayStack* stk, int num) {
}
void pop(ArrayStack* stk) {
}
int top(ArrayStack* stk) {
}
int main() {
return 0;
}

View file

@ -0,0 +1,42 @@
/**
* File: linkedlist_stack.c
* Created Time: 2022-01-12
* Author: Zero (glj0@outlook.com)
*/
#include "../include/include.h"
struct LinkedListStack {
ListNode* stkTop;
size_t stkSize;
};
typedef struct LinkedListStack LinkedListStack;
void new(LinkedListStack* stk) {
}
size_t size(LinkedListStack* stk) {
}
bool empty(LinkedListStack* stk) {
}
void push(LinkedListStack* stk, int num) {
}
void pop(LinkedListStack* stk) {
}
int top(LinkedListStack* stk) {
}
int main() {
return 0;
}

View file

@ -6,3 +6,6 @@
#include "../include/include.h"
int main() {
return 0;
}