码迷,mamicode.com
首页 >  
搜索关键字:in-place    ( 1961个结果
(LeetCode 92)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-...
分类:其他好文   时间:2015-04-27 23:36:38    阅读次数:144
TP:2AAB85C3
Please prove that you are the blog's owner by placing this code somewhere in a post: TP:2AAB85C3 Place it somewhere where I can easily find it — you can remove the code in about 1-4 days....
分类:其他好文   时间:2015-04-27 16:54:00    阅读次数:136
State management
1. Application StateIn asp.net platform, application state is the place to store data is common to all components in the application and is shared bet...
分类:其他好文   时间:2015-04-26 22:29:40    阅读次数:187
【Rotate Image】cpp
题目:You are given annxn2D matrix representing an image.Rotate the image by 90 degrees (clockwise).Follow up:Could you do this in-place?代码:class Solutio...
分类:其他好文   时间:2015-04-26 18:03:09    阅读次数:99
voa 2015 / 4 / 25
When English speakers talk about time and place, there are three little words that often come up:in,on, andat. These common words are prepositions tha...
分类:其他好文   时间:2015-04-25 10:38:43    阅读次数:114
[LeetCode] Remove Element
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 matter what you leave beyo...
分类:其他好文   时间:2015-04-24 14:22:19    阅读次数:123
[LeetCode] Remove Duplicates from Sorted Array
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 anot...
分类:其他好文   时间:2015-04-24 14:21:43    阅读次数:138
Rotate Image
题目:You are given an n x n 2D matrix represengting an image.Rotate the image by 90 degrees(clockwise).Follow up:Could you do this in-place?给定一副由 N * N ...
分类:其他好文   时间:2015-04-23 21:41:56    阅读次数:138
【Remove Elements】cpp
题目: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 ...
分类:其他好文   时间:2015-04-23 15:14:35    阅读次数:107
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. 遍历矩阵,如果遇到等于0的元素,则把该元素所在行的第一个元素和所在列第一个元素置为0。考虑到row0和col0会重合,所以另外设置一个变量col0来表示第一列的情况。 然后从左下角开始,把符合条件的元素置...
分类:其他好文   时间:2015-04-23 13:17:37    阅读次数:104
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!