func (s *Stack[T]) Push(values ...T) {
	if len(values) == 0 {
		return
	}

	var min T
	var max T

	if s.IsEmpty() {
		min = values[0]
		max = values[0]
	} else {
		minMaxInterface, _ := s.minMaxStack.Peek()
		min = minMaxInterface[0]
		max = minMaxInterface[1]
	}

	for i := 0; i < len(values); i++ {
		value := values[i]

		if s.compare(value, min) {
			min = value
		}

		if s.compare(max, value) {
			max = value
		}

		s.valuesStack.Push(value)
		s.minMaxStack.Push([]T{min, max})
	}
}
// Push add to the stack
Push add to the stack
// Push add to the stack
func (s *Stack[T]) Push(values ...T) {
	if len(values) == 0 {
		return
	}
	var min T
	var max T
	if s.IsEmpty() {
		min = values[0]
		max = values[0]
	} else {
		minMaxInterface, _ := s.minMaxStack.Peek()
		min = minMaxInterface[0]
		max = minMaxInterface[1]
	}
	for i := 0; i < len(values); i++ {
		value := values[i]
		if s.compare(value, min) {
			min = value
		}
		if s.compare(max, value) {
			max = value
		}
		s.valuesStack.Push(value)
		s.minMaxStack.Push([]T{min, max})
	}
}
func ( s * Stack [ T ] ) Push ( values ... T ) { if len ( values ) == 0 { return } var min T var max T if s . IsEmpty ( ) { min = values [ 0 ] max = values [ 0 ] } else { minMaxInterface , _ := s . minMaxStack . Peek ( ) min = minMaxInterface [ 0 ] max = minMaxInterface [ 1 ] } for i := 0 ; i < len ( values ) ; i ++ { value := values [ i ] if s . compare ( value , min ) { min = value } if s . compare ( max , value ) { max = value } s . valuesStack . Push ( value ) s . minMaxStack . Push ( [ ] T { min , max } ) } }
Push add to the stack
Push add to the stack