kit

package
v1.4.6 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2019 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

func IsEqualSliceInt

func IsEqualSliceInt(s1, s2 []int) bool

IsEqualSliceInt returns a boolean reporting whether the slices values are deeply equal in any order.

func ListNode2SliceInt

func ListNode2SliceInt(l *ListNode) (s []int)

convert *ListNode to []int

func TreeNode2SliceInt

func TreeNode2SliceInt(t *TreeNode) (s []int)

convert *TreeNode to []int

Types

type ListNode

type ListNode struct {
	Val  int
	Next *ListNode
}

Definition for singly-linked list.

func SliceInt2ListNode

func SliceInt2ListNode(s []int) *ListNode

convert []int to *ListNode

type TreeNode

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

Definition for a binary tree node.

func SliceInt2TreeNode

func SliceInt2TreeNode(s []int) *TreeNode

convert []int to *TreeNode

Jump to

Keyboard shortcuts

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