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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? unorderedlinkedlist.h

?? C++編成數(shù)據(jù)結(jié)構(gòu)與程序設(shè)計(jì)方法 D.S.Malk編著
?? H
字號(hào):
#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

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
中文字幕一区二区5566日韩| 欧美性大战久久久久久久蜜臀 | 在线中文字幕一区| 欧美日韩夫妻久久| 精品国产成人在线影院 | 99精品在线免费| 欧美精品一二三四| 久久久www成人免费毛片麻豆| 国产精品毛片高清在线完整版| 亚洲综合久久av| 久久激五月天综合精品| 99re热这里只有精品免费视频| 欧美三级日本三级少妇99| 精品捆绑美女sm三区| 日韩码欧中文字| 麻豆国产欧美日韩综合精品二区 | 亚洲欧美日韩电影| 毛片av中文字幕一区二区| www.66久久| 欧美一级电影网站| 亚洲日本va午夜在线影院| 秋霞影院一区二区| 97超碰欧美中文字幕| 日韩一二三区不卡| 一卡二卡三卡日韩欧美| 激情都市一区二区| 欧美少妇bbb| 国产精品情趣视频| 美国十次了思思久久精品导航| 97久久久精品综合88久久| 精品日韩在线观看| 性欧美疯狂xxxxbbbb| 99在线精品视频| 亚洲精品一区二区三区在线观看| 尤物av一区二区| 成人精品视频.| 欧美r级电影在线观看| 亚洲国产另类av| 波多野结衣在线一区| 亚洲精品一区在线观看| 日本欧美加勒比视频| 欧亚洲嫩模精品一区三区| 亚洲欧洲日韩女同| 国产福利视频一区二区三区| 91精品婷婷国产综合久久性色 | 欧美日韩国产小视频| 日韩理论片在线| 成人网在线免费视频| 日韩欧美你懂的| 日韩在线一区二区| 精品视频在线看| 亚洲男女毛片无遮挡| 99re视频精品| 中文字幕在线不卡| 成人精品视频一区| 国产欧美精品一区二区色综合| 麻豆精品视频在线观看免费 | 国产精品综合在线视频| 欧美一个色资源| 天天操天天色综合| 欧美揉bbbbb揉bbbbb| 玉米视频成人免费看| 色老汉一区二区三区| 亚洲免费在线播放| 91免费在线看| 亚洲欧美福利一区二区| 色欧美日韩亚洲| 亚洲欧美成人一区二区三区| 色综合天天性综合| 亚洲欧美综合色| a4yy欧美一区二区三区| 中文字幕日本乱码精品影院| 成人av午夜电影| 国产精品妹子av| 91影视在线播放| 亚洲综合色噜噜狠狠| 在线日韩一区二区| 午夜精品aaa| 在线播放视频一区| 日本午夜精品视频在线观看| 91麻豆精品国产91久久久资源速度 | 久久不见久久见免费视频1| 日韩一区二区三区电影在线观看 | 欧美精品一区二区三区在线播放| 精品一区二区三区免费观看| 久久综合九色综合欧美98| 国产精品12区| 国产精品毛片a∨一区二区三区| 成人av网站在线| 樱桃国产成人精品视频| 在线观看国产91| 一区二区三区美女| 在线不卡a资源高清| 六月丁香婷婷久久| 久久精品一区四区| 成人免费看黄yyy456| 一区二区三区日韩在线观看| 91精品国产色综合久久久蜜香臀| 轻轻草成人在线| 久久综合狠狠综合久久激情| 粉嫩绯色av一区二区在线观看 | 在线观看免费亚洲| 奇米精品一区二区三区四区 | 成人性生交大合| 亚洲猫色日本管| 91精品国产综合久久香蕉麻豆| 韩国三级中文字幕hd久久精品| 国产精品福利影院| 欧美精品日韩一本| 国产福利一区在线观看| 亚洲老妇xxxxxx| 日韩欧美中文一区| 99热这里都是精品| 午夜欧美在线一二页| 国产网站一区二区| 欧美在线一区二区三区| 麻豆成人久久精品二区三区红| 欧美国产日韩在线观看| 欧美日韩美女一区二区| 激情欧美一区二区三区在线观看| 国产精品免费视频观看| 欧美日韩国产综合视频在线观看 | 国产精品精品国产色婷婷| 欧美日韩中文字幕精品| 国产精品资源网站| 亚洲一区中文在线| 久久久不卡网国产精品一区| 欧美日韩中文字幕一区二区| 顶级嫩模精品视频在线看| 亚洲成人1区2区| 国产精品欧美久久久久无广告 | 久久精品二区亚洲w码| 1000精品久久久久久久久| 欧美一级黄色录像| 99久久综合狠狠综合久久| 蜜桃av一区二区| 亚洲女人小视频在线观看| 久久精品一区二区三区不卡| 91国内精品野花午夜精品| 国产在线精品一区二区夜色| 亚洲va欧美va国产va天堂影院| 国产日韩欧美在线一区| 欧美精品乱码久久久久久| 99久久精品国产毛片| 国产精品538一区二区在线| 日韩电影在线一区| 一区二区三区精密机械公司| 国产欧美精品在线观看| 精品卡一卡二卡三卡四在线| 欧美色男人天堂| 99精品欧美一区二区三区小说 | 国产日韩精品一区二区浪潮av | 国产一区二区三区四区五区美女| 亚洲一区二区视频在线| 中文字幕一区二区三区乱码在线| 欧美刺激午夜性久久久久久久| 欧美精品三级在线观看| 欧美性猛片aaaaaaa做受| 色婷婷狠狠综合| 99这里只有精品| 国产成人精品一区二区三区网站观看| 免费观看一级欧美片| 亚洲国产日日夜夜| 亚洲一区电影777| 一区二区三区色| 亚洲女爱视频在线| 日韩毛片高清在线播放| 国产精品欧美久久久久无广告 | 99免费精品视频| 成人免费观看男女羞羞视频| 久久电影国产免费久久电影| 偷拍一区二区三区| 亚洲国产一区二区三区| 亚洲一级片在线观看| 一区二区三区四区不卡在线| 亚洲一区在线视频观看| 亚洲午夜精品一区二区三区他趣| 亚洲黄网站在线观看| 亚洲精品美国一| 亚洲欧美另类在线| 亚洲女子a中天字幕| 一区二区激情视频| 亚洲午夜视频在线| 天堂一区二区在线免费观看| 视频一区视频二区中文| 午夜一区二区三区视频| 日韩国产精品久久| 蜜臀av性久久久久蜜臀aⅴ| 乱中年女人伦av一区二区| 精品在线观看免费| 国产一区二区三区av电影| 国产美女精品人人做人人爽| 国产成人在线视频网址| 成av人片一区二区| 91福利区一区二区三区| 欧美日本精品一区二区三区| 欧美一卡在线观看| 亚洲精品一区二区精华| 国产日韩影视精品| 亚洲伦在线观看|