구현하기
-
자료구조: Linked List Queue 구현하기 (feat. c++)알고리즘/자료구조 2021. 5. 31. 19:35
Characteristic: - MyQueue class is a Queue class consisted of linked list Operations: - enqueue - dequeue - front - isEmpty #include #include using namespace std; template class MyQueue { public: MyQueue(); void enqueue(queueElementType elem); queueElementType dequeue(); queueElementType front(); bool isEmpty(); private: struct Node; typedef Node* nodePtr; struct Node { queueElementType elem; no..
-
자료구조: Dummy Inorder Linked List 구현하기 (feat. c++)알고리즘/자료구조 2021. 4. 16. 17:29
Characteristic: - MyList class is a Inorder(ascending order) Linked List class with dummy head Operations: - insert - first - next - remove #include #include using namespace std; typedef char ListElementType; class MyList { public: MyList(); void insert(const ListElementType& elem); bool first(ListElementType& elem); bool next(ListElementType& elem); void remove(const ListElementType& target); p..