⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 genliststack.h

📁 这是清华出的这本经典的数据结构第三版上的随书例子。希望对大家有用。
💻 H
字号:
//**********************  genListStack.h  *************************//     generic stack defined as a doubly linked list#ifndef LL_STACK#define LL_STACK#include <list>template<class T>class LLStack {public:    LLStack() {     }    void clear() {        lst.clear();    }    bool isEmpty() const {         return lst.empty();      }    T& topEl() {         return lst.back();    }    T pop() {         T el = lst.back();        lst.pop_back();          return el;    }    void push(const T& el) {         lst.push_back(el);    }private:    list<T> lst;};#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -