Documentation
¶
Index ¶
- Variables
- func CountNodes(root *TreeNode) (cnt int)
- func GetParents(root *TreeNode) map[*TreeNode]*TreeNode
- func IsDebugging() bool
- func RunLeetCodeFuncWithExamples(t *testing.T, f interface{}, rawExamples [][]string, targetCaseNum int) (err error)
- func RunLeetCodeFuncWithFile(t *testing.T, f interface{}, filePath string, targetCaseNum int) error
- func ToGraph(root *TreeNode) [][]int
- func ToGraphWithDir(root *TreeNode) [][]DirEdge
- func ToWeightedGraph(root *TreeNode) [][]Edge
- func Values(head *ListNode) (values []int)
- type DirEdge
- type Edge
- type Interval
- type ListNode
- type Node
- type Point
- type TreeNode
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func CountNodes ¶
func GetParents ¶
func IsDebugging ¶
func IsDebugging() bool
IsDebugging will return true if the process was launched from Delve or the gopls language server debugger.
It does not detect situations where a debugger attached after process start. Adapted from https://stackoverflow.com/a/70969754/4419904
func RunLeetCodeFuncWithExamples ¶
func RunLeetCodeFuncWithExamples(t *testing.T, f interface{}, rawExamples [][]string, targetCaseNum int) (err error)
RunLeetCodeFuncWithExamples rawExamples[i] = 输入+输出,若反射出来的函数或 rawExamples 数据不合法,则会返回一个非空的 error,否则返回 nil
func RunLeetCodeFuncWithFile ¶
func ToGraphWithDir ¶
func ToWeightedGraph ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.