顺序存储优点:1 不用额外增加新的节点空间2 可以快速读取任意位置的元素顺序存储缺点:1 插入和删除需要移动大量元素2 长度变化较大时,难以估计长度3 存储空间碎片化读取时,时间复杂度为O(1);插入或删除时,时间复杂度为O(...
Given a sorted linked list, delete all duplicates such that each element appear only once. For example, Given 1->1->2, return 1->2. Given 1->1->2->3->3, ret...
Given a singly linked list, determine if it is a palindrome. Follow up: Could you do it in O(n) ti