UfcppSample
UfcppSample copied to clipboard
!が足りない?
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するため)
私の読み間違いでしたらすみません・・・
ずいぶん昔に書いたコードな上に、当時全然テストコードを書いていなかったし、どう扱うかで悩み中です… (これを機にテストコードを増やしておくべきか等)