自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(6)
  • 收藏
  • 关注

原创 【LEETCODE】86- Partition List [Python]

Given a linked list and a value x, partition it such that all nodes less than x come before nodes greater than or equal to x. You should preserve the original relative order of the nodes in each of

2016-02-26 10:46:04 2037

原创 【LEETCODE】82- Remove Duplicates from Sorted List II [Python]

Given a sorted linked list, delete all nodes that have duplicate numbers, leaving only distinct numbers from the original list. For example, Given 1->2->3->3->4->4->5, return 1->2->5. Given 1->1-

2016-02-25 19:25:30 1205

原创 【LEETCODE】143- Reorder List [Python]

Given a singly linked list L: L0→L1→…→Ln-1→Ln, reorder it to: L0→Ln→L1→Ln-1→L2→Ln-2→… You must do this in-place without altering the nodes' values. For example, Given {1,2,3,4}, reorder it to {1,

2016-02-24 16:05:42 1166

原创 【LEETCODE】61- Rotate List [Python]

Given a list, rotate the list to the right by k places, where k is non-negative. For example: Given 1->2->3->4->5->NULL and k = 2, return 4->5->1->2->3->NULL. 题意: 给一个list,向右轮换k个位置,k非负

2016-02-24 12:24:49 1408

原创 【LEETCODE】148- Sort List [Python]

Sort a linked list in O(n log n) time using constant space complexity. 题意: 对一个链表排序,O(n log n) time , constant space complexity 思路: 根据题意对时间和空间复杂度的要求,此处排序用归并 参考: 归并排序: http://blog.csd

2016-02-23 17:35:56 1915

原创 【LEETCODE】328- Odd Even Linked List [Python]

Given a singly linked list, group all odd nodes together followed by the even nodes. Please note here we are talking about the node number and not the value in the nodes. You should try to do it in p

2016-02-23 11:37:21 1715

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除