Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MyLinkedList ¶
MyLinkedList wraps utils.ListNode
func (*MyLinkedList) AddAtHead ¶
func (ll *MyLinkedList) AddAtHead(val int)
AddAtHead add a new head
func (*MyLinkedList) AddAtIndex ¶
func (ll *MyLinkedList) AddAtIndex(index int, val int)
AddAtIndex at a new node at index with val, time complelxity O(N)
func (*MyLinkedList) AddAtTail ¶
func (ll *MyLinkedList) AddAtTail(val int)
AddAtTail add a new node at the end
func (*MyLinkedList) DeleteAtIndex ¶
func (ll *MyLinkedList) DeleteAtIndex(index int)
DeleteAtIndex delete a node at index
func (*MyLinkedList) Get ¶
func (ll *MyLinkedList) Get(index int) int
Get returns the ith node'value
func (*MyLinkedList) String ¶
func (ll *MyLinkedList) String() string
Click to show internal directories.
Click to hide internal directories.