原文:[leetcode]Rotate List @ Python

原题地址:https: oj.leetcode.com problems rotate list 题意: Given a list, rotate the list to the right bykplaces, wherekis non negative. For example:Given gt gt gt gt gt NULLandk ,return gt gt gt gt gt NULL. ...

2014-06-13 11:19 0 3260 推荐指数:

查看详情

Rotate List leetcode java

题目: 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 ...

Thu Jul 24 08:54:00 CST 2014 0 4560
[LeetCode] Rotate List 旋转链表

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 ...

Sat Mar 21 21:49:00 CST 2015 2 10692
[leetcode]Rotate Image @ Python

原题地址:https://oj.leetcode.com/problems/rotate-image/ 题意: You are given an n x n 2D matrix representing an image. Rotate the image by 90 degrees ...

Sat Jun 07 01:03:00 CST 2014 0 3937
Rotate Image leetcode java

题目: You are given an n x n 2D matrix representing an image. Rotate the image by 90 degrees (clockwise). Follow up: Could you do this in-place ...

Sat Aug 02 17:09:00 CST 2014 0 2990
[leetcode]Sort List @ Python

原题地址:http://oj.leetcode.com/problems/sort-list/ 题意:链表的排序。要求:时间复杂度O(nlogn),空间复杂度O(1)。 解题思路:由于题目对时间复杂度和空间复杂度要求比较高,所以查看了各种解法,最好的解法就是归并排序,由于链表在归并操作时 ...

Wed Apr 30 00:23:00 CST 2014 0 4300
[leetcode]Rotate Array

in place交换 如果是k步,那么就是把后面k个放到前面了嘛。 我们先把整个数组reverse,然后把前面的reverse回来,再把后面的reverse回来 对于AB我们要通过reve ...

Fri Feb 27 05:03:00 CST 2015 0 2047
[leetcode]Partition List @ Python

原题地址:https://oj.leetcode.com/problems/partition-list/ 题意: Given a linked list and a value x, partition it such that all nodes less than x come ...

Thu Jun 12 17:38:00 CST 2014 0 2671
[leetcode]Reorder List @ Python

原题地址:http://oj.leetcode.com/problems/reorder-list/ 题意: Given a singly linked list L: L0→L1→…→Ln-1→Ln,reorder it to: L0→Ln→L1→Ln-1→L2→Ln-2→… You ...

Wed Apr 30 18:59:00 CST 2014 0 2923
 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM