mirror of
https://github.com/duke-git/lancet.git
synced 2026-02-09 23:22:28 +08:00
feat: and Clear and IsEmpty func
This commit is contained in:
@@ -73,8 +73,8 @@ func (s *LinkedStack[T]) Peak() (*T, error) {
|
||||
return &s.top.Value, nil
|
||||
}
|
||||
|
||||
// EmptyStack clear the stack data
|
||||
func (s *LinkedStack[T]) EmptyStack() {
|
||||
// Clear clear the stack data
|
||||
func (s *LinkedStack[T]) Clear() {
|
||||
s.top = nil
|
||||
s.length = 0
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user