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

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

?? doublylinkedlist.pm

?? PERL語言資料 可以用于PERL程序設計
?? PM
字號:
# Figure 20.7: DoublyLinkedList.pm
# Implementation of a doubly linked list.

use warnings;
use strict;

package DoublyLinkedListNode;

# DoublyLinkedListNode constructor
sub new 
{
   my $type = shift();
   my $class = ref( $type ) || $type;
   my $self = { previousLink => $_[ 0 ],
                nextLink => $_[ 1 ],
                data => $_[ 2 ] };
                
   bless( $self, $class );
   return $self;
}

package DoublyLinkedList;

# DoublyLinkedList constructor
sub new 
{
   my $type = shift();
   my $class = ref( $type ) || $type;
   my $self = { };

   # head and tail dummy nodes
   $self->{ head } = new DoublyLinkedListNode(); 
   $self->{ head }{ nextLink } = 
      new DoublyLinkedListNode( $self->{ head } );
   $self->{ cursor } = $self->{ head }{ nextLink };

   bless( $self, $class );   
   return $self;
}

# inserts an element before the cursor and 
# sets the cursor to that element.
sub insertNode
{
   my ( $self, $data ) = @_;
   
   if ( !defined( $data ) ) { 
      return; 
   }
   
   my $newnode = new DoublyLinkedListNode( 
      $self->{ cursor }->{ previousLink }, 
      $self->{ cursor }, $data );

   $self->{ cursor }->{ previousLink }->{ nextLink } = $newnode;
   $self->{ cursor }->{ previousLink } = $newnode;
}

# deletes the current cursor element and returns the deleted
# node's data ( or undefined if no node is selected ).
sub deleteNode
{
   my ( $self ) = shift();
   
   if ( !defined( $self->{ cursor }->{ data } ) ) {
      print "You don't have an element selected\n";
      return undef;
   }
   
   $self->{ cursor }->{ previousLink }->{ nextLink } = 
      $self->{ cursor }->{ nextLink };
   $self->{ cursor }->{ nextLink }->{ previousLink } = 
      $self->{ cursor }->{ previousLink };

   my $deleted = $self->{ cursor }->{ data };
   $self->{ cursor } = $self->{ cursor }->{ nextLink };
   
   return $deleted;
}

# moves the cursor to the next node in the list
sub nextNode 
{
   my $self = shift();

   if ( defined( $self->{ cursor }->{ nextLink } ) &&
        defined( $self->{ cursor }{ nextLink }{ data } ) ) {
      $self->{ cursor } = $self->{ cursor }{ nextLink };
      return $self->{ cursor }{ data };
   }
   else {
      print( "Can not go to the next node.\n" );
      return undef;
   }
}

# moves the cursor to the previous node in the list
sub previousNode
{
   my $self = shift();

   unless( defined( $self->{ cursor }{ previousLink } ) && 
      defined( $self->{ cursor }{ previousLink }{ data } ) ) {

      print( "Can not go to the previous node.\n" );
      return;
   }

   $self->{ cursor } = $self->{ cursor }->{ previousLink };
   return $self->{ cursor }->{ data };
}

# moves the cursor to the head of the list
sub gotoHead 
{
   $_[ 0 ]->{ cursor } = $_[ 0 ]->{ head }{ nextLink };
   return $_[ 0 ]->{ cursor }->{ data };
}

# returns the data at the current cursor location
sub data 
{
   return $_[ 0 ]->{ cursor }->{ data };
}

# prints the list contents
sub printAll 
{
   my $self = shift();
   my $current = $self->{ head }{ nextLink };

   if ( !defined( $current->{ data } ) ) { 
      print( "The list is empty.\n\n" );
      return;
   }
   
   print( "HEAD <--> " );

   while ( defined( $current->{ data } ) ) {
      print( "$current->{ data } <--> " );
      $current = $current->{ nextLink };
   }

   print( "TAIL\n" );
}

return 1;

###########################################################################
#  (C) Copyright 2001 by Deitel & Associates, Inc. and Prentice Hall.     #
#  All Rights Reserved.                                                   #
#                                                                         #
#  DISCLAIMER: The authors and publisher of this book have used their     #
#  best efforts in preparing the book. These efforts include the          #
#  development, research, and testing of the theories and programs        #
#  to determine their effectiveness. The authors and publisher make       #
#  no warranty of any kind, expressed or implied, with regard to these    #
#  programs or to the documentation contained in these books. The authors #
#  and publisher shall not be liable in any event for incidental or       #
#  consequential damages in connection with, or arising out of, the       #
#  furnishing, performance, or use of these programs.                     #
###########################################################################

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
在线亚洲欧美专区二区| 国产精品一卡二卡| 亚洲欧美日韩中文字幕一区二区三区 | 秋霞国产午夜精品免费视频| 一区二区三区在线高清| 亚洲欧美区自拍先锋| 亚洲精品国产一区二区三区四区在线 | 麻豆精品一区二区三区| 免费成人结看片| 国产精品123| av在线播放成人| 欧美写真视频网站| 欧美一级日韩免费不卡| 26uuu色噜噜精品一区| 国产偷国产偷精品高清尤物| 中文字幕免费不卡在线| 亚洲天天做日日做天天谢日日欢| 亚洲免费在线观看| 亚洲18女电影在线观看| 蜜桃av一区二区三区电影| 国产成人免费在线观看| 欧洲精品一区二区三区在线观看| 欧美一级艳片视频免费观看| 久久这里只精品最新地址| 中文字幕亚洲一区二区va在线| 伊人性伊人情综合网| 日韩高清国产一区在线| 丰满放荡岳乱妇91ww| 欧美在线不卡视频| 国产三级欧美三级日产三级99| 亚洲欧美成aⅴ人在线观看| 亚洲一区二区三区视频在线播放| 久久99精品久久久久久| 99久免费精品视频在线观看| 欧美三级欧美一级| 中文字幕 久热精品 视频在线| 一区二区在线观看免费 | 精品国内二区三区| 亚洲人成在线播放网站岛国| 亚洲一区二区中文在线| 国产馆精品极品| 日韩一区二区在线观看视频| 国产精品嫩草99a| 蜜桃久久av一区| 欧美日韩在线观看一区二区 | 成人动漫在线一区| 欧美精品三级在线观看| 中文字幕一区二区三区在线播放| 麻豆精品国产91久久久久久| 色综合久久88色综合天天免费| xf在线a精品一区二区视频网站| 亚洲高清免费视频| 99国产麻豆精品| 久久久www免费人成精品| 日产欧产美韩系列久久99| 99久久免费国产| 欧美激情一区二区三区不卡| 日韩不卡免费视频| 欧美日韩成人激情| 一区二区三区免费网站| av在线一区二区三区| 精品国产第一区二区三区观看体验 | 99久久伊人网影院| 亚洲国产精品高清| 懂色av一区二区夜夜嗨| 精品国产伦一区二区三区观看体验| 亚洲国产精品久久人人爱| 成人精品电影在线观看| 欧美激情一区在线观看| 国产乱子伦视频一区二区三区 | 欧美zozozo| 九九热在线视频观看这里只有精品| 欧美三级乱人伦电影| 亚洲精品五月天| 精品视频全国免费看| 一区二区在线观看免费| 欧美午夜宅男影院| 秋霞电影一区二区| 亚洲精品一区二区三区蜜桃下载 | 高潮精品一区videoshd| 久久免费美女视频| 国产成人在线免费| 国产精品福利av| 日本高清不卡一区| 日韩国产精品久久久久久亚洲| 欧美人体做爰大胆视频| 久久国产三级精品| 久久久久国产免费免费 | 亚洲国产综合在线| 欧美肥胖老妇做爰| 国产麻豆9l精品三级站| 国产精品久久久久久久久搜平片| 91欧美一区二区| 日韩不卡一区二区三区| 久久综合av免费| 色婷婷综合激情| 精品一区二区综合| 国产精品久久久久久户外露出| 在线观看国产一区二区| 毛片av一区二区| 国产精品免费视频网站| 欧美日韩精品电影| 国产精品一线二线三线精华| 亚洲欧美一区二区视频| 欧美老年两性高潮| 国产福利一区二区三区视频在线 | 国产精品1区2区3区| 亚洲视频小说图片| 日韩亚洲欧美成人一区| 国产成人av自拍| 日本亚洲最大的色成网站www| 国产欧美va欧美不卡在线| 欧美视频中文字幕| 成人网页在线观看| 免费成人你懂的| 一区二区高清在线| 国产日韩欧美麻豆| 日韩亚洲欧美高清| 欧美午夜精品一区| 成人av电影免费观看| 日韩国产成人精品| 亚洲精选视频在线| 国产亚洲综合色| 日韩一区二区在线观看视频| 91影视在线播放| 成人午夜免费视频| 国产在线播放一区| 亚洲成人中文在线| 亚洲欧洲av一区二区三区久久| 欧美大片顶级少妇| 欧美裸体一区二区三区| 99久久99久久久精品齐齐| 国产精品资源网| 久久99精品久久久| 久久国产精品99久久人人澡| 亚洲国产精品久久久久婷婷884| 中文字幕一区二区三区四区不卡 | 99久久精品国产一区二区三区| 日本va欧美va瓶| 亚洲一区二区精品3399| 17c精品麻豆一区二区免费| 久久久久久麻豆| 欧美精品一区二区三| 9191久久久久久久久久久| 欧美性感一类影片在线播放| 91最新地址在线播放| av影院午夜一区| 99久久久精品| 91丨porny丨首页| 91无套直看片红桃| 91在线无精精品入口| 成人18视频日本| 色噜噜狠狠一区二区三区果冻| 色综合久久久久久久| 波多野结衣精品在线| 99久久久久久| 欧美中文字幕一区| 欧美二区三区的天堂| 欧美一区二区三区思思人| 337p亚洲精品色噜噜| 欧美一区二区三区四区五区| 欧美一级电影网站| 国产亚洲综合性久久久影院| 国产欧美一区二区精品性色超碰 | 欧美精品一区二区三区高清aⅴ| 日韩欧美国产一区二区在线播放 | 成人中文字幕合集| 处破女av一区二区| 色狠狠桃花综合| 欧美一区二区精品在线| 久久久另类综合| 亚洲另类一区二区| 男女男精品网站| 成人黄色电影在线| 欧美日韩国产经典色站一区二区三区 | 亚洲电影在线免费观看| 欧美aaaaaa午夜精品| 国产精品主播直播| 欧美最猛性xxxxx直播| 制服丝袜av成人在线看| 久久精品一区二区| 一区二区三区高清不卡| 美腿丝袜在线亚洲一区| 国产成人精品影院| 欧美日本在线观看| 国产精品久久夜| 日一区二区三区| 成人免费视频免费观看| 欧美视频第二页| 国产日韩欧美高清| 日本欧美在线看| 99精品黄色片免费大全| 欧美精品粉嫩高潮一区二区| 久久久91精品国产一区二区三区| 亚洲综合999| 成人精品视频网站| 欧美哺乳videos| 亚洲高清视频在线| 91免费版pro下载短视频| 91精品国产综合久久久蜜臀粉嫩|