摘要:
Problem I翻转链表程序(简洁版)非递归ListNode reverseList(ListNode head) { ListNode pre = null; ListNode cur = head; while (cur != null ) { ListNode next = cur.ne... 阅读全文
摘要:
http://blog.csdn.net/huagong_adu/article/details/7619665 阅读全文
摘要:
问题描述Sort a linked list using insertion sort.解决思路1.设置first和last指针;2.插入分三种情况。程序public class Solution { public ListNode insertionSortList(ListNode hea... 阅读全文
摘要:
问题描述Given an unsorted integer array, find the first missing positive integer.For example,Given[1,2,0]return3,and[3,4,-1,1]return2.Your algorithm shoul... 阅读全文
摘要:
Best Time to Buy and Sell Stock ISay you have an array for which theithelement is the price of a given stock on dayi.If you were only permitted to com... 阅读全文