func (s *Stack[T]) Pop() (res T, err error) {
	if s.IsEmpty() {
		return res, errEmptyStack
	}

	size := s.Size()
	value := s.array[size-1]
	s.array = s.array[:size-1]
	return value, nil
}
// Pop remove from the stack
Pop remove from the stack
// Pop remove from the stack
func (s *Stack[T]) Pop() (res T, err error) {
	if s.IsEmpty() {
		return res, errEmptyStack
	}
	size := s.Size()
	value := s.array[size-1]
	s.array = s.array[:size-1]
	return value, nil
}
func ( s * Stack [ T ] ) Pop ( ) ( res T , err error ) { if s . IsEmpty ( ) { return res , errEmptyStack } size := s . Size ( ) value := s . array [ size - 1 ] s . array = s . array [ : size - 1 ] return value , nil }
Pop remove from the stack
Pop remove from the stack