skiplist is an important data structure of database and many database use this as the basic structure in memory.
/// In the database I also use two Skiplist in memory to store datas temperary.
/// We refer the source of leveldb,however we know that the first time, google use C++ writting leveldb and then rewrite it by go.
#[allow(unused)]
pub mod skip_lists
{
use std::{borrow::{Borrow, BorrowMut}, cell::{Ref, RefCell}, collections::btree_map::Values, rc::Rc};
use std::cmp::PartialOrd;
use crate::algorithm::{baisc_data::basic_data, random};
use crate::algorithm::baisc_data;
pub enum InsertResult
{
Successful,
Fault,
Exist
}
#[derive(Debug,Clone)]
///## Node of skiplist
///
///
We will build a kv database,so the node has two members key and value.