linkedlist

package
v0.0.0-...-de2953b Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func JosephusKill1

func JosephusKill1(l *linkedlist.LList, m int) (res int)

环形链表模拟约瑟夫环问题.

func JosephusKill2

func JosephusKill2(l *linkedlist.LList, m int) (res int)

递归计算最后报数位置.

func RemoveByRatio

func RemoveByRatio(l *linkedlist.LList, a, b int)

按比例删除节点.

func RemoveLastKthDNode

func RemoveLastKthDNode(l *linkedlist.DList, k int)

删除双链表倒数第K节点.

func RemoveLastKthNode

func RemoveLastKthNode(l *linkedlist.LList, k int)

删除单链表倒数第K节点.

func RemoveMidNode

func RemoveMidNode(l *linkedlist.LList)

删除列表中间节点.

func ReverseDList

func ReverseDList(l *linkedlist.DList)

原地逆置双链表.

func ReverseList

func ReverseList(l *linkedlist.LList)

原地逆置链表.

func ReversePart

func ReversePart(l *linkedlist.LList, from, to int)

原地逆置部分链表.

Types

This section is empty.

Jump to

Keyboard shortcuts

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