(LinkedListNode node)
| 61 | } |
| 62 | |
| 63 | public static int linkedListToInt(LinkedListNode node) { |
| 64 | int value = 0; |
| 65 | while (node != null) { |
| 66 | value = value * 10 + node.data; |
| 67 | node = node.next; |
| 68 | } |
| 69 | return value; |
| 70 | } |
| 71 | |
| 72 | public static void main(String[] args) { |
| 73 | LinkedListNode lA1 = new LinkedListNode(3, null, null); |