增加特殊值节点的测试用例

This commit is contained in:
lichao 2019-05-09 16:47:21 +08:00
parent 88b6d1bddd
commit 60d818eeec

View File

@ -105,3 +105,9 @@ console.log('-------------find by item------------')
LList.findByValue('chen') LList.findByValue('chen')
console.log('-------------find by index------------') console.log('-------------find by index------------')
LList.findByIndex(2) LList.findByIndex(2)
console.log('-------------与头结点同值元素测试------------')
LList.insert('head', 'sang')
LList.display() // chen -> qian -> sang -> head -> zhao -> zhou
LList.findPrev('head') // sang
LList.remove('head')
LList.display() // chen -> qian -> sang -> zhao -> zhou