mono_stack

package
v0.0.0-...-f3335f4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 21, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Max

func Max[T int | int64](a T, b T) T

func RunMonoStack

func RunMonoStack()

目标:子数组累加和与子数组中最小值的乘积A的最大值 [2,1,3] (2+1+3)*1=6 as数组可以包含相等的数

Types

type Element

type Element struct {
	// contains filtered or unexported fields
}

记录子数组左边界索引和值,右边界索引和值,子数组最小值索引和值

type Result

type Result struct {
	// contains filtered or unexported fields
}

type Stack

type Stack[T int | int64 | *[]int | *[]int64] []T

栈类型 slice必须放入指针

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL