亚洲欧美第一页_禁久久精品乱码_粉嫩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一区二区三区免费野_久草精品视频
欧美一区二区在线看| 日韩欧美综合一区| 成人app在线| 国产成a人无v码亚洲福利| 裸体歌舞表演一区二区| 青青青爽久久午夜综合久久午夜| 丝袜脚交一区二区| 日本aⅴ免费视频一区二区三区| 亚洲成a人片综合在线| 天堂成人国产精品一区| 欧美aaa在线| 国产美女视频一区| bt欧美亚洲午夜电影天堂| av一区二区三区在线| 在线亚洲一区二区| 69堂成人精品免费视频| 精品国产精品网麻豆系列| 久久色成人在线| 国产精品日日摸夜夜摸av| 亚洲日本青草视频在线怡红院| 亚洲欧洲99久久| 午夜精品免费在线观看| 久久av中文字幕片| 99re视频精品| 91麻豆精品国产91久久久使用方法| 日韩欧美一区二区久久婷婷| 中文字幕av不卡| 午夜精品影院在线观看| 国产美女久久久久| 欧美色窝79yyyycom| 欧美精品一区二区三区蜜臀| 亚洲伦在线观看| 蜜桃av噜噜一区二区三区小说| 成人综合婷婷国产精品久久蜜臀 | 国产欧美精品一区二区色综合| 国产精品久久久久婷婷二区次| 亚洲成人中文在线| 成人丝袜视频网| 欧美日韩亚州综合| 亚洲国产精品精华液2区45| 亚洲国产成人91porn| 国产91精品欧美| 日韩视频一区二区三区在线播放| 中文字幕免费观看一区| 日韩电影在线看| caoporen国产精品视频| 精品国产乱码久久久久久老虎| 亚洲免费观看高清完整| 国产精品996| 6080国产精品一区二区| 最新日韩av在线| 国内精品第一页| 宅男在线国产精品| 一区二区三区四区不卡视频| 丁香婷婷综合色啪| 久久伊99综合婷婷久久伊| 亚洲高清不卡在线观看| 色屁屁一区二区| 最新日韩av在线| 粉嫩高潮美女一区二区三区| 精品人在线二区三区| 五月婷婷另类国产| 欧美日韩在线三区| 亚洲乱码国产乱码精品精98午夜 | 一区二区三区在线播放| 国产超碰在线一区| 国产片一区二区三区| 久久99久久久久久久久久久| 在线成人免费视频| 亚洲国产日韩一级| 欧美三级日韩三级国产三级| 亚洲综合精品久久| 在线视频一区二区三| 一区二区三区四区精品在线视频| 成人精品亚洲人成在线| 国产免费久久精品| 国产91高潮流白浆在线麻豆| 欧美精品一区二区三| 韩国av一区二区三区| 久久精品亚洲一区二区三区浴池| 久久er精品视频| 国产亚洲人成网站| 国产成人亚洲综合a∨婷婷| 久久久国际精品| 国产91丝袜在线18| 1000部国产精品成人观看| 色悠悠久久综合| 午夜伦欧美伦电影理论片| 欧美精品色综合| 美女任你摸久久| 欧美精品一区二区精品网| 国产69精品久久久久777| 一区在线中文字幕| 欧美视频在线一区二区三区| 日日夜夜免费精品| 久久先锋资源网| 成+人+亚洲+综合天堂| 亚洲曰韩产成在线| 欧美mv日韩mv| av成人老司机| 亚洲国产人成综合网站| 91精品婷婷国产综合久久性色| 日韩不卡一二三区| 国产偷国产偷精品高清尤物| 色婷婷一区二区| 麻豆视频一区二区| 成人欧美一区二区三区黑人麻豆 | 秋霞午夜av一区二区三区| 久久久久久97三级| 欧美日韩一区国产| 国产精品1024| 亚洲国产视频直播| 欧美激情一区二区三区全黄| 在线视频亚洲一区| 国产精品69久久久久水密桃 | 在线观看免费成人| 麻豆精品视频在线| 亚洲美女视频一区| 26uuu亚洲婷婷狠狠天堂| 欧美在线观看18| 国产成都精品91一区二区三| 香蕉久久夜色精品国产使用方法| 久久久久久久综合| 欧美一区二区三区视频在线观看| 成人黄色网址在线观看| 久久国产精品无码网站| 亚洲激情av在线| 国产欧美一区二区三区沐欲| 3atv在线一区二区三区| 99视频精品全部免费在线| 国产在线精品一区二区| 亚洲丰满少妇videoshd| 亚洲蜜臀av乱码久久精品蜜桃| 日韩免费福利电影在线观看| 欧美在线免费播放| 99精品视频一区| 粉嫩av一区二区三区在线播放| 日韩黄色免费电影| 亚洲精品中文在线影院| 成人免费一区二区三区视频| 久久久综合视频| 久久亚洲精品小早川怜子| 91精品国产综合久久婷婷香蕉| 91丝袜美腿高跟国产极品老师| 国产精品一二三区| 久久 天天综合| 免费成人深夜小野草| 日韩成人免费在线| 日韩不卡一区二区三区| 国产一区二区三区四| 国产一区二区三区视频在线播放| 玖玖九九国产精品| 久久精品国产亚洲a| 美女精品自拍一二三四| 理论电影国产精品| 精品亚洲成av人在线观看| 国模一区二区三区白浆| 国产一区二区三区在线观看免费 | 午夜久久电影网| 亚洲高清在线视频| 视频一区视频二区中文字幕| 天堂蜜桃91精品| 日本三级韩国三级欧美三级| 美女在线视频一区| 国产成人综合亚洲网站| 成人久久久精品乱码一区二区三区 | 亚洲福利视频三区| 日本伊人午夜精品| 国产在线精品不卡| 国产99久久久精品| 一本到三区不卡视频| 91传媒视频在线播放| 欧美日韩国产精选| 欧美一区二区在线看| 国产欧美日产一区| 一区二区三区在线视频观看| 日韩黄色免费电影| 国产乱码精品一品二品| 91视频一区二区三区| 日韩一区二区在线观看视频播放| 欧美成人一区二区| 成人免费小视频| 免费亚洲电影在线| 99久久er热在这里只有精品66| 欧美色欧美亚洲另类二区| 26uuu另类欧美亚洲曰本| 亚洲人亚洲人成电影网站色| 亚洲一区二区三区国产| 黄色精品一二区| 在线观看日韩电影| 久久看人人爽人人| 亚洲一区影音先锋| 丁香激情综合国产| 91麻豆精品国产91久久久资源速度 | 免费久久99精品国产| 成人在线综合网| 欧美日本一区二区三区四区| 国产日韩综合av| 日本欧美肥老太交大片| 一本色道久久综合亚洲aⅴ蜜桃|