aalhour / C-Sharp-Algorithms

:books: :chart_with_upwards_trend: Plug-and-play class-library project of standard Data Structures and Algorithms in C#
MIT License
5.91k stars 1.4k forks source link

A new SkipList<int> contains 0 #139

Open Hoodedgull opened 4 years ago

Hoodedgull commented 4 years ago

Describe the bug A new SkipList\<int> contains 0 (zero). It should not contain any numbers before any numbers are added.

To Reproduce Steps to reproduce the behavior:

  1. Create a new SkipList of integers var list = new SkipList<int>();
  2. Check if it contains 0: var result = list.Contains(0)
  3. Result is true.

Expected behavior I would expect (new SkipList<int>()).Contains(0) to return false.

Environmnet: