亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? unorderedlinkedlist.h

?? C++編成數據結構與程序設計方法 D.S.Malk編著
?? H
字號:
#ifndef H_UnorderedLinkedList
#define H_UnorderedLinkedList

#include "linkedList.h"

using namespace std;

template <class Type>
class unorderedLinkedList: public linkedListType<Type>
{
public:
    bool search(const Type& searchItem) const;
      //Function to determine whether searchItem is in the list.
      //Postcondition: Returns true if searchItem is in the 
      //               list, otherwise the value false is 
      //               returned.

    void insertFirst(const Type& newItem);
      //Function to insert newItem at the beginning of the list.
      //Postcondition: first points to the new list, newItem is
      //               inserted at the beginning of the list,
      //               last points to the last node in the  
      //               list, and count is incremented by 1.

    void insertLast(const Type& newItem);
      //Function to insert newItem at the end of the list.
      //Postcondition: first points to the new list, newItem 
      //               is inserted at the end of the list,
      //               last points to the last node in the 
      //               list, and count is incremented by 1.

    void deleteNode(const Type& deleteItem);
      //Function to delete deleteItem from the list.
      //Postcondition: If found, the node containing 
      //               deleteItem is deleted from the list.
      //               first points to the first node, last
      //               points to the last node of the updated 
      //               list, and count is decremented by 1.
};


template <class Type>
bool unorderedLinkedList<Type>::
                   search(const Type& searchItem) const
{
    nodeType<Type> *current; //pointer to traverse the list
    bool found = false;
    
    current = first; //set current to point to the first 
                     //node in the list

    while (current != NULL && !found)    //search the list
        if (current->info == searchItem) //searchItem is found
            found = true;
        else
            current = current->link; //make current point to
                                     //the next node
    return found; 
}//end search

template <class Type>
void unorderedLinkedList<Type>::insertFirst(const Type& newItem)
{
    nodeType<Type> *newNode; //pointer to create the new node

    newNode = new nodeType<Type>; //create the new node

    newNode->info = newItem;    //store the new item in the node
    newNode->link = first;      //insert newNode before first
    first = newNode;            //make first point to the
                                //actual first node
    count++;                    //increment count

    if (last == NULL)   //if the list was empty, newNode is also 
                        //the last node in the list
        last = newNode;
}//end insertFirst

template <class Type>
void unorderedLinkedList<Type>::insertLast(const Type& newItem)
{
    nodeType<Type> *newNode; //pointer to create the new node

    newNode = new nodeType<Type>; //create the new node

    newNode->info = newItem;  //store the new item in the node
    newNode->link = NULL;     //set the link field of newNode
                              //to NULL

    if (first == NULL)  //if the list is empty, newNode is 
                        //both the first and last node
    {
        first = newNode;
        last = newNode;
        count++;        //increment count
    }
    else    //the list is not empty, insert newNode after last
    {
        last->link = newNode; //insert newNode after last
        last = newNode; //make last point to the actual 
                        //last node in the list
        count++;        //increment count
    }
}//end insertLast


template <class Type>
void unorderedLinkedList<Type>::deleteNode(const Type& deleteItem)
{
    nodeType<Type> *current; //pointer to traverse the list
    nodeType<Type> *trailCurrent; //pointer just before current
    bool found;

    if (first == NULL)    //Case 1; the list is empty. 
        cout << "Cannot delete from an empty list."
             << endl;
    else
    {
        if (first->info == deleteItem) //Case 2 
        {
            current = first;
            first = first->link;
            count--;
            if (first == NULL)    //the list has only one node
                last = NULL;
            delete current;
        }
        else //search the list for the node with the given info
        {
            found = false;
            trailCurrent = first;  //set trailCurrent to point
                                   //to the first node
            current = first->link; //set current to point to 
                                   //the second node

            while (current != NULL && !found)
            {
                if (current->info != deleteItem) 
                {
                    trailCurrent = current;
                    current = current-> link;
                }
                else
                    found = true;
            }//end while

            if (found) //Case 3; if found, delete the node
            {
                trailCurrent->link = current->link;
                count--;

                if (last == current)   //node to be deleted 
                                       //was the last node
                    last = trailCurrent; //update the value 
                                         //of last
                delete current;  //delete the node from the list
            }
            else
                cout << "The item to be deleted is not in "
                     << "the list." << endl;
        }//end else
    }//end else
}//end deleteNode


#endif

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲精品日韩专区silk| 91精品在线免费| 视频一区二区国产| 国产日产欧美精品一区二区三区| 一区二区国产视频| 久久综合网色—综合色88| 一本大道综合伊人精品热热 | 国产精品久久久久9999吃药| 国产美女av一区二区三区| 国产人成一区二区三区影院| 懂色av一区二区三区蜜臀| 国产精品蜜臀在线观看| 日韩免费性生活视频播放| 欧美午夜电影网| 免费成人av资源网| 亚洲一区二区三区四区在线免费观看 | 国产一区二区三区电影在线观看| 欧美成人猛片aaaaaaa| 在线观看免费亚洲| 青青国产91久久久久久| 久久亚洲影视婷婷| 成人久久视频在线观看| 激情文学综合丁香| 日本一不卡视频| 久久久国际精品| 精品国产乱子伦一区| 欧美日韩视频在线第一区| 日韩**一区毛片| 在线电影院国产精品| 天天综合色天天综合色h| 久久精品国产在热久久| 国产日韩av一区| 色妞www精品视频| 亚洲国产日韩在线一区模特| 精品少妇一区二区三区视频免付费| 日韩三级.com| 国产成人av网站| 亚洲成人在线观看视频| 中文字幕不卡在线观看| 亚洲三级免费观看| 91精品国产福利| 色婷婷国产精品久久包臀| 午夜欧美一区二区三区在线播放| 国产真实乱偷精品视频免| 国产精品水嫩水嫩| 亚洲国产激情av| 亚洲午夜免费福利视频| 日日夜夜免费精品| 久久99国内精品| 中文无字幕一区二区三区| 波多野结衣中文字幕一区二区三区| 亚洲成人免费视频| 日韩一区二区免费在线观看| 91免费观看视频在线| 欧美在线高清视频| 中文字幕在线观看一区二区| 免费精品99久久国产综合精品| 国产一区二区三区| 视频一区在线播放| 久久精品二区亚洲w码| 一区二区三区毛片| 国产日韩亚洲欧美综合| 国产精品国产三级国产三级人妇| 日韩欧美高清一区| 日韩女优毛片在线| 国产精品免费人成网站| 国产精品国模大尺度视频| 国产精品黄色在线观看| 亚洲乱码国产乱码精品精可以看| 美女视频黄频大全不卡视频在线播放| 欧美日韩美女一区二区| 亚洲最大成人综合| 亚洲小少妇裸体bbw| 久久成人久久爱| 日韩欧美成人一区二区| 欧美一区二区三区视频免费播放| 亚洲欧美另类图片小说| 国产精品久线观看视频| 日韩精品在线看片z| 中文字幕一区二区三中文字幕| 精品播放一区二区| **欧美大码日韩| 欧美bbbbb| 91亚洲精品一区二区乱码| 国产不卡视频在线播放| 欧美日韩国产123区| 欧美日韩在线一区二区| 久久久久久久久久久久久夜| 精品国产一区二区三区久久久蜜月| 欧美电影在哪看比较好| 欧美日韩国产首页在线观看| 欧美日韩国产小视频在线观看| 欧美日韩国产高清一区二区三区 | 精品美女一区二区三区| 综合久久一区二区三区| 亚洲欧美欧美一区二区三区| 老司机免费视频一区二区| 99久久精品情趣| 337p粉嫩大胆噜噜噜噜噜91av| 精品三级在线观看| 亚洲午夜一区二区三区| 丁香婷婷综合色啪| 日韩精品一区二区在线| 亚洲成在人线在线播放| jlzzjlzz亚洲女人18| 久久一留热品黄| 蜜臂av日日欢夜夜爽一区| 欧美色中文字幕| 亚洲欧美日韩电影| 不卡一区二区中文字幕| 2021中文字幕一区亚洲| 日本不卡一二三区黄网| 欧美性猛交一区二区三区精品| 91超碰这里只有精品国产| 最新国产精品久久精品| 亚洲一区二区精品视频| 97久久超碰精品国产| 亚洲精品欧美激情| 国产麻豆成人传媒免费观看| 成人福利电影精品一区二区在线观看| 91麻豆精品在线观看| 日本一二三不卡| 国产精一品亚洲二区在线视频| 成人av在线影院| 国产视频一区在线播放| 精品一区二区免费视频| 精品欧美乱码久久久久久1区2区| 婷婷久久综合九色综合伊人色| 亚洲一级在线观看| 欧美精品少妇一区二区三区| 午夜电影网一区| 韩国精品免费视频| 亚洲欧美偷拍另类a∨色屁股| 亚洲天堂2016| 欧美视频在线播放| 日韩女优视频免费观看| 成人午夜看片网址| 一区二区三区免费网站| 日韩欧美国产一二三区| 高清成人在线观看| 日韩高清一区在线| www成人在线观看| 欧美主播一区二区三区| 欧美一级在线观看| 狠狠色伊人亚洲综合成人| 中文久久乱码一区二区| 欧美精品一区二区高清在线观看| 欧美日韩国产高清一区二区| 欧美视频日韩视频在线观看| 欧美日韩在线播放一区| 日韩写真欧美这视频| 精品一区二区久久久| 日本中文字幕一区二区视频 | 亚洲免费毛片网站| 欧美精品丝袜久久久中文字幕| 天天影视涩香欲综合网| 成人免费视频国产在线观看| 国产成人免费在线观看不卡| 97久久精品人人做人人爽50路| 91精品国产综合久久久久| 免费av网站大全久久| 26uuu久久天堂性欧美| 国产不卡高清在线观看视频| 亚洲欧美综合色| 欧美在线|欧美| 麻豆国产欧美日韩综合精品二区 | 亚洲一区二区三区四区在线观看| 国产ts人妖一区二区| 激情亚洲综合在线| 美女视频黄a大片欧美| 日韩—二三区免费观看av| 久久久国际精品| 久久久激情视频| 国产精品欧美综合在线| 国产喂奶挤奶一区二区三区| 午夜精品福利久久久| 精品入口麻豆88视频| 欧美图区在线视频| 欧美影院午夜播放| 亚洲综合在线免费观看| 一区二区久久久久| 99精品视频在线免费观看| 色综合咪咪久久| 日韩一级大片在线观看| 日韩视频一区二区在线观看| 日韩免费电影网站| 久久精品一区二区三区四区| 国产精品美女久久久久aⅴ国产馆| 在线免费观看日韩欧美| 中文字幕一区三区| 精品在线观看免费| 亚洲三级免费观看| 欧美精品一区二区三区一线天视频| 亚洲成av人片在线观看无码| 国产区在线观看成人精品| 欧美二区在线观看| 在线视频国内自拍亚洲视频| 国产酒店精品激情| 国产精品久久久久三级| 欧美一区二区三区小说|