⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 clist.h

📁 data structures, algorithms and Application书的源代码
💻 H
字号:
template<class T>
int CircularList<T>::Search(const T& x) const
{// Locate x in a circular list with head node.
   ChainNode<T> *current = first->link;
   int index = 1; // index of current
   first->data = x; // put x in head node

   // search for x
   while (current->data != x) {
      current = current->link);
      index++;
      }

   // are we at head?
   return ((current == first) ? 0 : index);
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -