Random commentary about Machine Learning, BigData, Spark, Deep Learning, C++, STL, Boost, Perl, Python, Algorithms, Problem Solving and Web Search
The right grammar should be that "skip lists are a ..."
more precisely: "are an interesting"
if ((tk == 0) || // null? ( key < tk->key_)) // search key < next level link's keyIs not correct. C++ does not guarantee left to right evaluation and so this may result in a segmentation fault depending on the compiler.
@anonymous:of course it does for && and ||: it is called shortcut evaluation, and test for null OR dereference is idiomatic both in C and C++.
I believe you have a bug in your search__ function:if ((x == 0)) || (key < x->val_))Shouldn't this read:if ((x == 0)) || (key < x->key_))?