_022_02

package
v0.0.0-...-982d520 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CalculateMoneyInLeetcodeBank

func CalculateMoneyInLeetcodeBank(n int) int

Calculate Money in Leetcode Bank leetcode: https://leetcode-cn.com/problems/calculate-money-in-leetcode-bank/

func CountNumber

func CountNumber(nums []int, k int) int

Count Number of Pairs With Absolute Difference K leetcode: https://leetcode-cn.com/problems/count-number-of-pairs-with-absolute-difference-k/

func CountOfMatchesInTournament

func CountOfMatchesInTournament(n int) int

Count of Matches in Tournament leetcode: https://leetcode-cn.com/problems/count-of-matches-in-tournament/

func FindKPairsWithSmallestSums

func FindKPairsWithSmallestSums(nums1 []int, nums2 []int, k int) [][]int

Find K Pairs with Smallest Sums leetcode: https://leetcode-cn.com/problems/find-k-pairs-with-smallest-sums/

func LargestNumber

func LargestNumber(nums []int) int

func LuckyNumbersInAMatrix

func LuckyNumbersInAMatrix(matrix [][]int) []int

Lucky Numbers in a Matrix leetcode: https://leetcode-cn.com/problems/lucky-numbers-in-a-matrix/

func MaximumDifferenceBetweenIncreasingElements

func MaximumDifferenceBetweenIncreasingElements(nums []int) int

Maximum Difference Between Increasing Elements leetcode: https://leetcode-cn.com/problems/maximum-difference-between-increasing-elements/

func MinimumDifference

func MinimumDifference(nums []int, k int) int

Minimum Difference Between Highest and Lowest of K Scores leetcode: https://leetcode-cn.com/problems/minimum-difference-between-highest-and-lowest-of-k-scores/

func NumberOfEnclaves

func NumberOfEnclaves(grid [][]int) int

func PancakeSorting

func PancakeSorting(arr []int) []int

Pancake Sorting leetcode: https://leetcode-cn.com/problems/pancake-sorting/

func PathWithMaximumGold

func PathWithMaximumGold(grid [][]int) int

Path with Maximum Gold leetcode: https://leetcode-cn.com/problems/path-with-maximum-gold/

func PushDominoes

func PushDominoes(dominoes string) string

Push Dominoes leetcode: https://leetcode-cn.com/problems/push-dominoes/

func SumOfUniqueElements

func SumOfUniqueElements(nums []int) int

Sum of Unique Elements leetcode: https://leetcode-cn.com/problems/sum-of-unique-elements/

func WhereWillTheBallFall

func WhereWillTheBallFall(grid [][]int) []int

Where Will the Ball Fall leetcode: https://leetcode-cn.com/problems/where-will-the-ball-fall/

Types

type ListNode

type ListNode struct {
	Val  int
	Next *ListNode
}

Linked List Random Node leetcode: https://leetcode-cn.com/problems/linked-list-random-node/

type Pair

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

type Solution

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

蓄水池抽样

func Constructor

func Constructor(head *ListNode) Solution

func (*Solution) GetRandom

func (s *Solution) GetRandom() (ans int)

type TreeNode

type TreeNode struct {
	Val   int
	Left  *TreeNode
	Right *TreeNode
}

Lowest Common Ancestor of a Binary Tree leetcode: https://leetcode-cn.com/problems/lowest-common-ancestor-of-a-binary-tree/

func LowestCommonAncestorOfABinaryTree

func LowestCommonAncestorOfABinaryTree(root, p, q *TreeNode) *TreeNode

Jump to

Keyboard shortcuts

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