_021_06

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: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BinaryWatch

func BinaryWatch(turnedOn int) []string

func CheckIfNumberIsASumOfPowersOfThree

func CheckIfNumberIsASumOfPowersOfThree(n int) bool

func CheckIfNumberIsASumOfPowersOfThree2

func CheckIfNumberIsASumOfPowersOfThree2(n int) bool

func CheckIfNumberIsASumOfPowersOfThree3

func CheckIfNumberIsASumOfPowersOfThree3(n int) bool

func Coin

func Coin(n int) int

func CoinChange2

func CoinChange2(amount int, coins []int) int

func ContainsDuplicateIII

func ContainsDuplicateIII(nums []int, k, t int) bool

func ContiguousArray

func ContiguousArray(nums []int) int

func ContinuousSubarraySum

func ContinuousSubarraySum(nums []int, k int) bool

func ContinuousSubarraySum2

func ContinuousSubarraySum2(nums []int, k int) bool

前缀和 + 数组 超时

func CourseScheduleIV

func CourseScheduleIV(numCourses int, prerequisites [][]int, queries [][]int) []bool

func EatFavoriteCandyAtFavoriteDay

func EatFavoriteCandyAtFavoriteDay(candiesCount []int, queries [][]int) []bool

func FirstBadVersion

func FirstBadVersion(n int) int

func KokoEatingBananas

func KokoEatingBananas(piles []int, h int) int

func MinimumJumpsToReachHome

func MinimumJumpsToReachHome(forbidden []int, a int, b int, x int) int

func TargetSum

func TargetSum(nums []int, target int) int

dp

func TargetSum2

func TargetSum2(nums []int, target int) int

回溯

Types

type ListNode

type ListNode struct {
	Val  int
	Next *ListNode
}

func IntersectionOfTwoLinkedLists

func IntersectionOfTwoLinkedLists(headA, headB *ListNode) *ListNode

func IntersectionOfTwoLinkedLists2

func IntersectionOfTwoLinkedLists2(headA, headB *ListNode) *ListNode

hash

func RemoveLinkedListElements

func RemoveLinkedListElements(head *ListNode, val int) *ListNode

func RemoveLinkedListElements2

func RemoveLinkedListElements2(head *ListNode, val int) *ListNode

func ReverseLinkedListII

func ReverseLinkedListII(head *ListNode, left int, right int) *ListNode

栈解法

func ReverseLinkedListII2

func ReverseLinkedListII2(head *ListNode, left, right int) *ListNode

Jump to

Keyboard shortcuts

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