반응형
자료구조: Array로 Stack 구현하기 (feat. c++)
-
자료구조: Array로 Stack 구현하기 (feat. c++)알고리즘/자료구조 2021. 4. 15. 17:25
Characteristic: - MyStack class is stack class made by array operations: - push - pop - top - isEmpty - isFull #include #include using namespace std; const int maxStackSize = 1000; template class MyStack { public: MyStack(); void push(StackElementType item); StackElementType pop(); StackElementType top(); bool isEmpty(); bool isFull(); private: StackElementType stackArray[maxStackSize]; int topI..