diff --git a/datastructure/stack/arraystack.go b/datastructure/stack/arraystack.go index 8dd682b..3b546fd 100644 --- a/datastructure/stack/arraystack.go +++ b/datastructure/stack/arraystack.go @@ -47,7 +47,7 @@ func (s *ArrayStack[T]) Pop() (*T, error) { return &topItem, nil } -// Peak return the top element of stack then return it +// Peak return the top element of stack func (s *ArrayStack[T]) Peak() (*T, error) { if s.IsEmpty() { return nil, errors.New("stack is empty")