码迷,mamicode.com
首页 >  
搜索关键字:in place    ( 1961个结果
Rotate Image <leetcode>
You are given annxn2D matrix representing an image.Rotate the image by 90 degrees (clockwise).Follow up:Could you do this in-place?思路:首先左右翻转,然后按照左下,右上...
分类:其他好文   时间:2014-09-03 19:50:47    阅读次数:241
UVA - 12230 Crossing Rivers (期望)
Description You live in a village but work in another village. You decided to follow the straight path between your house (A) and the working place (B), but there are several rivers you need to cro...
分类:其他好文   时间:2014-09-03 11:22:36    阅读次数:215
[干货]兼容HTML5的Placeholder属性-更新版v0.10102013
HTML5对WebForm做了许多增强,比如input新增的type类型、FormValidation等。Placeholder是HTML5新增的另一个属性,当input或者textarea设置了该属性后,该值的内容将作为灰字提示显示在文本框中,当文本框获得焦点时,提示文字消失。这里提供了Place...
分类:Web程序   时间:2014-09-01 17:11:33    阅读次数:217
LeetCode: Reverse Linked List
LeetCode: Reverse Linked ListReverse 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 ...
分类:其他好文   时间:2014-08-31 22:45:51    阅读次数:215
UVA 11080 - Place the Guards(二分图判定)
UVA 11080 - Place the Guards 题目链接 题意:一些城市,之间有道路相连,现在要安放警卫,警卫能看守到当前点周围的边,一条边只能有一个警卫看守,问是否有方案,如果有最少放几个警卫 思路:二分图判定,判定过程记录下白点和黑点个数,小的就是要安放的个数,注意如果是0,那么应该是加1 代码: #include #include #include...
分类:其他好文   时间:2014-08-31 17:20:21    阅读次数:155
【leetcode】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 beyond the n...
分类:其他好文   时间:2014-08-31 17:20:11    阅读次数:271
[LeetCode] Remove Duplicates from Sorted Array
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-08-30 02:21:18    阅读次数:246
【LeetCode】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 it to ...
分类:其他好文   时间:2014-08-30 00:06:58    阅读次数:359
Set Matrix Zeroes
class Solution: # @param matrix, a list of lists of integers # RETURN NOTHING, MODIFY matrix IN PLACE. def setZeroes(self, matrix): di...
分类:其他好文   时间:2014-08-29 16:00:48    阅读次数:203
[LeetCode] 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...
分类:其他好文   时间:2014-08-29 02:35:13    阅读次数:203
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!