Documentation
¶
Index ¶
- func AddFourNumbers(A [3]int, B [3]int, C [3]int, D [3]int) (count int)
- func AddFourNumbers1(A [3]int, B [3]int, C [3]int, D [3]int) (length int)
- func BinarySearch(a []int, n int) int
- func BinarySearch1(a []int, n int) int
- func BinarySearch2(a []int, n int) int
- func ByteSliceValueEqual(a, b []byte) bool
- func Reverse(s string) string
- func SliceValueEqual(a, b []int) bool
- type ListNode
- type MyLinkedList
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddFourNumbers ¶
AddFourNumbers 该方法的时间复杂度为 O(n^2)
func AddFourNumbers1 ¶
AddFourNumbers1 该方法虽然能测试通过,但是时间复杂度未 O(n^4), 不可取
func BinarySearch ¶
func BinarySearch2 ¶
func ByteSliceValueEqual ¶
Types ¶
type MyLinkedList ¶
type MyLinkedList struct { Head *ListNode `json:"header"` Tail *ListNode `json:"tail"` Lens int `json:"lens"` }
func Constructor ¶
func Constructor() MyLinkedList
func (*MyLinkedList) AddAtHead ¶
func (this *MyLinkedList) AddAtHead(val int)
func (*MyLinkedList) AddAtIndex ¶
func (this *MyLinkedList) AddAtIndex(index int, val int)
func (*MyLinkedList) AddAtTail ¶
func (this *MyLinkedList) AddAtTail(val int)
func (*MyLinkedList) DeleteAtIndex ¶
func (this *MyLinkedList) DeleteAtIndex(index int)
func (*MyLinkedList) Get ¶
func (this *MyLinkedList) Get(index int) int
func (*MyLinkedList) PrintMyLinkedList ¶
func (this *MyLinkedList) PrintMyLinkedList()
Click to show internal directories.
Click to hide internal directories.