Commit 4568efd
Ahmad Alhour
Fix critical bugs in SkipList and BinomialMinHeap, modernize tests
Bug fixes:
- SkipList: Fix _getNextLevel() starting at 0 instead of 1, causing ~50% of
inserted nodes to be lost (fixes #137, #138, #139, #140)
- BinomialMinHeap: Fix double size increment in Add() causing incorrect count
- BinomialMinHeap: Fix broken size accounting in _removeAtIndex() causing
infinite loop due to integer overflow in Merge()
Test modernization:
- Replace Debug.Assert with Xunit.Assert across graph algorithm tests
- Modernize data structure tests with focused test methods
- Add comprehensive SkipList edge case tests
- Update assertion styles to use Assert.Equal, Assert.Throws, Assert.Contains1 parent c88b530 commit 4568efd
29 files changed
Lines changed: 3752 additions & 1977 deletions
File tree
- DataStructures
- Heaps
- Lists
- UnitTest
- AlgorithmsTests
- DataStructuresTests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
90 | 94 | | |
91 | 95 | | |
92 | 96 | | |
93 | 97 | | |
94 | | - | |
| 98 | + | |
| 99 | + | |
95 | 100 | | |
96 | | - | |
97 | | - | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
98 | 104 | | |
99 | 105 | | |
100 | 106 | | |
| |||
103 | 109 | | |
104 | 110 | | |
105 | 111 | | |
106 | | - | |
107 | | - | |
108 | | - | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
109 | 116 | | |
110 | | - | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
111 | 125 | | |
112 | | - | |
113 | | - | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
114 | 171 | | |
115 | 172 | | |
116 | 173 | | |
| |||
209 | 266 | | |
210 | 267 | | |
211 | 268 | | |
| 269 | + | |
212 | 270 | | |
213 | | - | |
214 | | - | |
215 | | - | |
216 | 271 | | |
217 | 272 | | |
218 | 273 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| 34 | + | |
34 | 35 | | |
35 | | - | |
| 36 | + | |
36 | 37 | | |
37 | 38 | | |
38 | | - | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
39 | 43 | | |
40 | | - | |
| 44 | + | |
41 | 45 | | |
42 | 46 | | |
43 | 47 | | |
| |||
0 commit comments