码迷,mamicode.com
首页 >  
搜索关键字:in-place    ( 1961个结果
[Leetcode][JAVA] 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-10-08 01:02:44    阅读次数:268
【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-10-07 17:53:53    阅读次数:221
leetcode——Rotate Image(二维数组顺时针旋转90度)
题目: 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? 分析: 二维数...
分类:其他好文   时间:2014-10-07 16:44:13    阅读次数:311
Set Matrix Zeroes
Given amxnmatrix, 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?A s...
分类:其他好文   时间:2014-10-07 12:03:03    阅读次数:231
简单的内存分配器
采用自定义的operator运算符实现自己的内存分配策略,在某些时候可以提高程序的效率。C++中的new运算符,具体工作流程如下:1.调用operator new申请原始内存2.调用place new表达式,执行类的构造函数3.返回内存地址而delete操作符的工作是:1.调用对象的析构函数2.调用...
分类:其他好文   时间:2014-10-05 19:54:28    阅读次数:262
【Leetcode】Reorder List JAVA
一、题目描述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.Fo...
分类:编程语言   时间:2014-10-04 17:36:36    阅读次数:207
Locality-constrained Linear Coding for Image Classification
引入 This paper presents a simple but effective coding scheme called Locality-constrained Linear Coding (LLC) in place of the VQ coding in traditional S...
分类:其他好文   时间:2014-10-03 17:30:14    阅读次数:599
leetcode - Flatten Binary Tree to Linked List
Given a binary tree, flatten it to a linked list in-place. For example, Given 1 / 2 5 / \ 3 4 6 The flattened tree should look like: 1 ...
分类:其他好文   时间:2014-10-02 15:12:43    阅读次数:193
简单的内存分配器
采用自定义的operator运算符实现自己的内存分配策略,在某些时候可以提高程序的效率。 C++中的new运算符,具体工作流程如下: 1.调用operator new申请原始内存 2.调用place new表达式,执行类的构造函数 3.返回内存地址 而delete操作符的工作是: 1.调用对象的析构...
分类:其他好文   时间:2014-10-02 02:25:11    阅读次数:165
Remove Duplicates from Sorted Array I&&II
Given a sorted array, remove the duplicates in place such that each element appear onlyonceand return the new length.Do not allocate extra space for a...
分类:其他好文   时间:2014-10-01 19:08:51    阅读次数:163
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!