摘要:
This is a simple but important algorithm when dealing with singly linked list.This algorithms can reversely access a singly linked list using O(n) time. Below is my code in Java.class Node{ Node next; int val;}class SinglyLinkedList{ Node head; Node tail; //append a new Node t... 阅读全文