摘要: 转+修改整理。import java.util.ArrayList;import java.util.Comparator;import java.util.HashMap;import java.util.PriorityQueue;import java.util.Stack;/** * htt... 阅读全文
posted @ 2014-07-08 22:42 jdflyfly 阅读(217) 评论(0) 推荐(0) 编辑
摘要: 检测链表是否是palindrome.思路1:翻转并比较。思路2:迭代。思路3:递归。 public static boolean isPalindrome(LinkedListNode head) { LinkedListNode fast = head; Link... 阅读全文
posted @ 2014-07-08 00:23 jdflyfly 阅读(172) 评论(0) 推荐(0) 编辑
摘要: Given a circular linked list, implement an algorithm which returns node at the beginning of the loop.DEFINITIONCircular linked list: A (corrupt) linke... 阅读全文
posted @ 2014-07-08 00:18 jdflyfly 阅读(109) 评论(0) 推荐(0) 编辑
摘要: You have two numbers represented by a linked list, where each node contains a single digit. The digits are stored in reverse order, such that the 1’s ... 阅读全文
posted @ 2014-07-08 00:12 jdflyfly 阅读(122) 评论(0) 推荐(0) 编辑
摘要: 参考http://www.cnblogs.com/jdflyfly/p/3819162.html 阅读全文
posted @ 2014-07-08 00:11 jdflyfly 阅读(122) 评论(0) 推荐(0) 编辑