UfcppSample icon indicating copy to clipboard operation
UfcppSample copied to clipboard

!が足りない?

Open peroon opened this issue 7 years ago • 1 comments

https://github.com/ufcpp/UfcppSample/blob/master/Chapters/Algorithm/Collections/HashTable.cs こちらのErase()にて、

while (n.next != null && n.next.val.Equals(elem)) n = n.next; これは while (n.next != null && !n.next.val.Equals(elem)) n = n.next; が正しいのではないでしょうか? (消す要素が見つからない間はwhileするため)

私の読み間違いでしたらすみません・・・

peroon avatar Oct 09 '18 21:10 peroon

ずいぶん昔に書いたコードな上に、当時全然テストコードを書いていなかったし、どう扱うかで悩み中です… (これを機にテストコードを増やしておくべきか等)

ufcpp avatar Oct 20 '18 06:10 ufcpp