C-Sharp-Algorithms icon indicating copy to clipboard operation
C-Sharp-Algorithms copied to clipboard

Fixed #155 Fixed bad implement, bad data structure CircularBuffer

Open daoluong opened this issue 2 years ago • 1 comments

Description

fixed issue #155 improve data struct:

  • Pop now work like a stack (throw InvalidOperationException when pop an empty CircularBuffer)
  • No extra item in the inner array
  • Clear array instead of create anew
  • Fixed bad implement of IEnumerable (incorrect GetEnumerator, Contains, Remove)

Checklist

  • [x] An issue was first created before opening this pull request
  • [x] The new code follows the contribution guidelines
  • [x] I have performed a self-review of my own code
  • [x] I have commented my code, particularly in hard-to-understand areas
  • [x] I have made corresponding changes to the documentation
  • [x] My changes generate no new warnings
  • [x] I have added tests to ensure that prove my fix is effective or that my feature works
  • [x] New and existing unit tests pass locally with my changes

daoluong avatar Apr 09 '22 18:04 daoluong

您好,您的邮件我已经收到,会尽快处理,谢谢!中建八局设计管理总院 胡伟

hoowee avatar Apr 09 '22 18:04 hoowee