Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CarPooling ¶
resolve by embed. Input: trips = [[2,1,5],[3,3,7]], capacity = 4. Output: false. 0 <= fromi < toi <= 1000.
func CarPoolingByClass ¶
CarPoolingByClass resolve by pre-define class.
Types ¶
type Difference ¶
type Difference struct {
// contains filtered or unexported fields
}
diff array algorithm, detail: https://labuladong.gitee.io/algo/2/20/25/
func (*Difference) Increment ¶
func (d *Difference) Increment(i, j, val int)
Increment diff array add certainly value 'val' from indices i to j.
func (*Difference) Result ¶
func (d *Difference) Result() []int
Result return the result array after a series of operations.
Click to show internal directories.
Click to hide internal directories.