Skip to content

Latest commit

 

History

History
28 lines (19 loc) · 811 Bytes

Ex_1_3_31.md

File metadata and controls

28 lines (19 loc) · 811 Bytes
title date draft tags categories
Algorithm4 Java Solution 1.3.31
2019-07-04 05:47:10 +0800
false
JAVA
TECH
archives

1.3.31

Problem:

Implement a nested class DoubleNode for building doubly-linked lists, where each node contains a reference to the item preceding it and the item following it in the list (null if there is no such item). Then implement static methods for the following tasks: insert at the beginning, insert at the end, remove from the beginning, remove from the end, insert before a given node, insert after a given node, and remove a given node.

Solution:

refer to code.

note:

we should use static methods.

Reference:

yangxioahei-alg4