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

📄 hash.cpp

📁 数据结构与程序设计教材源码 数据结构与程序设计教材源码
💻 CPP
字号:
 
Error_code Hash_table::insert(Cell *new_entry)
{
   int probe, location;
   Cell *found;
   probe = hash(new_entry->row, new_entry->col);
   if (sequential_search(table[probe], new_entry->row, new_entry->col,
                                       location, found) == not_present)
      return (table[probe].insert(0, new_entry));
   else
      return (duplicate_error);
}
 
bool Hash_table::retrieve(int row, int col) const
{
   int probe, location;
   Cell *found;
   probe = hash(row, col);
   if (sequential_search(table[probe], row, col, location, found) ==
                         success) return true;
   else return false;
}

⌨️ 快捷键说明

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