Documentation ¶
Index ¶
- func CrossPrint()
- func Find(slice []int, target int, workCount int) (int, bool)
- func FindMaxn(s []int, n int) int
- func HeapSort(nums []int)
- func InOrderTraversal(p *TreeNode, res *[]int)
- func MergeSort(nums []int) []int
- func PostOrderTraversal(p *TreeNode, res *[]int)
- func PreOrderTraversal(p *TreeNode, res *[]int)
- func QuickSort(s []int)
- func Search(slice []int, target int) bool
- func Search2(slice []int, target int) (bool, error)
- type LRUCache
- type ListNode
- type Pair
- type TreeNode
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InOrderTraversal ¶
func PostOrderTraversal ¶
func PreOrderTraversal ¶
Types ¶
type LRUCache ¶
type LRUCache struct {
// contains filtered or unexported fields
}
LRU算法,选择最近最久未使用的页面予以淘汰。
func Constructor ¶
type ListNode ¶
type ListNode struct { Next *ListNode // contains filtered or unexported fields }
func ReverseList ¶
func ReverseSeg ¶
根据指定常数反转链表,比如1->2->3->4->5->6 指定2,输出:2->1->4->3->6->5 指定3,输出:3->2->1->6->5->4
Click to show internal directories.
Click to hide internal directories.