041 042 数据结构和算法的Java实现_穷举amp;递归amp;链表(精品·公开课件).pptVIP

  • 34
  • 0
  • 约4.78千字
  • 约 37页
  • 2018-11-05 发布于广西
  • 举报

041 042 数据结构和算法的Java实现_穷举amp;递归amp;链表(精品·公开课件).ppt

2006 《Java高级程序设计》 专业教程 理论讲解部分 Ver 3.1 节点的插入 value key value key value key … … parent current 首先,找到待插入位置的前继节点parent. 然后,将待插入节点current.next指向parent.next. 最后,将parent.next指向插入节点current 6.3 链表 节点的插入 public boolean insertNode(Node newNode,int index){ Node preNode = head; if(preNode == null || index == 0){ newNode.next = preNode; preNode = newNode; return true; }else{ while(preNode.next != null index--0){ preNode = preNode.next; } newNode.next = preNode.next; preNode.next = newNode; return true; } } 节点位置的查找 节点的插入 6.3 链表 本课小结 本课介绍了穷

文档评论(0)

1亿VIP精品文档

相关文档