码迷,mamicode.com
首页 >  
搜索关键字:in-place    ( 1961个结果
48-Rotate Image
【题目】You are given annxn2D matrix representing an image.Rotate the image by 90 degrees (clockwise).Follow up:Could you do this in-place?【analyze】1.先对角线...
分类:其他好文   时间:2015-05-06 17:06:14    阅读次数:147
【leetcode】Flatten Binary Tree to Linked List (middle)
Given a binary tree, flatten it to a linked list in-place.For example,Given 1 / \ 2 5 / \ \ 3 4 6The flattened t...
分类:其他好文   时间:2015-05-06 13:09:34    阅读次数:88
[LeetCode]151.Reverse Words in a String
Given an input string, reverse the string word by word.For example, Given s = “the sky is blue”, return “blue is sky the”.Update (2015-02-12): For C programmers: Try to solve it in-place in O(1) s...
分类:其他好文   时间:2015-05-06 00:01:27    阅读次数:188
Reverse Linked List II
题目描述: Reverse a linked list from position m to n. Do it in-place and in one-pass. For example: Given 1->2->3->4->5->NULL, m = 2 and n = 4, return 1->4->3->2->5->NULL. Note: Given m, ...
分类:其他好文   时间:2015-05-05 14:34:24    阅读次数:157
unity3d DefineManager 全局宏定义
/** * Editor Wizard for easily managing global defines in Unity * Place in Assets/Editor folder, or if you choose to place elsewhere * be sure to als....
分类:编程语言   时间:2015-05-04 17:12:46    阅读次数:500
leetcode-Remove Duplicates from Sorted Array
题目描述 Given a sorted array, remove the duplicates in place such that each element appear only once and return the new length. Do not allocate extra space for another array, you must do this in ...
分类:其他好文   时间:2015-05-04 15:35:18    阅读次数:140
【leetcode】Set Matrix Zeros
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 space...
分类:其他好文   时间:2015-05-04 13:45:22    阅读次数:120
leetcode || 143、Reorder List
problem: 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,...
分类:其他好文   时间:2015-05-04 11:54:03    阅读次数:144
Java for LeetCode 026 Remove Duplicates from Sorted Array
Given a sorted array, remove the duplicates in place such that each element appear only once and return the new length.Do not allocate extra space for...
分类:编程语言   时间:2015-05-03 21:57:40    阅读次数:132
Java for LeetCode 027 Remove Element
Given an array and a value, remove all instances of that value in place and return the new length.The order of elements can be changed. It doesn't mat...
分类:编程语言   时间:2015-05-03 21:46:58    阅读次数:118
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!