码迷,mamicode.com
首页 >  
搜索关键字:in-place    ( 1961个结果
[leetcode]Rotate Image
问题描述: 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? 基本思路: 此题要求矩阵顺时针转90度。可以找出元素选择规律: i‘ = j; j...
分类:其他好文   时间:2014-11-19 11:26:21    阅读次数:128
[leetcode]Rotate Image
问题描述: 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? 基本思路: 此题要求矩阵顺时针转90度。可以找出元素选择规律: i‘ = j; j...
分类:其他好文   时间:2014-11-19 01:24:29    阅读次数:154
poj 2236 Wireless Network 【并查集】
Wireless Network Time Limit: 10000MS   Memory Limit: 65536K Total Submissions: 16832   Accepted: 7068 Description An earthquake takes place in Southeast Asia. The ACM (...
分类:Web程序   时间:2014-11-18 01:40:07    阅读次数:223
Reverse Linked List II
Reverse a linked list from positionmton. Do it in-place and in one-pass.For example:Given1->2->3->4->5->NULL,m= 2 andn= 4,return1->4->3->2->5->NULL.No...
分类:其他好文   时间:2014-11-18 00:05:29    阅读次数:287
Leetcode: Reorder List
Given a singly linked listL: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 exam...
分类:其他好文   时间:2014-11-17 22:40:48    阅读次数:231
Leetcode: Reverse Linked List II
Reverse a linked list from positionmton. Do it in-place and in one-pass.For example:Given1->2->3->4->5->NULL,m= 2 andn= 4,return1->4->3->2->5->NULL.No...
分类:其他好文   时间:2014-11-17 14:01:44    阅读次数:173
LeetCode Solutions : 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 must do this in-place without altering the nodes' values. For example, Given {1,2,3,4}, reorder itto {1,4,...
分类:其他好文   时间:2014-11-17 10:45:06    阅读次数:179
Leetcode-Set Matrix Zeroes
Given a m x n matrix, if an element is 0, set its entire row and column to 0. Do it in place.click to show follow up.Follow up: Did you use extra spac...
分类:其他好文   时间:2014-11-17 00:23:53    阅读次数:244
[Leetcode] Reorder List
Given a singly linked listL: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 exam...
分类:其他好文   时间:2014-11-16 18:33:18    阅读次数:200
Reorder List
Given a singly linked listL: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 exam...
分类:其他好文   时间:2014-11-16 14:41:01    阅读次数:280
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!