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 place with...
分类:
其他好文 时间:
2014-10-25 18:51:14
阅读次数:
143
Building Fire Stations
Time Limit: 5 Seconds
Memory Limit: 131072 KB Special Judge
Marjar University is a beautiful and peaceful place. There are N buildings and
N - 1 bidirection...
分类:
其他好文 时间:
2014-10-24 20:45:46
阅读次数:
258
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-10-24 14:33:58
阅读次数:
154
1 public void quickSortSwapping(int data[]){ 2 //call this method 3 quickSortSwapping(data,0,data.length); 4 } 5 6 7 public void quickSortSwapping(...
分类:
其他好文 时间:
2014-10-24 12:48:46
阅读次数:
232
今天看到CSDN博客的勋章换了图表,同时也增加显示了博客等级,看起来都听清新的,感觉不错!
【题目】
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 yo...
分类:
其他好文 时间:
2014-10-24 11:01:34
阅读次数:
219
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?
class Solution {
public:
void rotate(std::vector >...
分类:
其他好文 时间:
2014-10-23 12:37:18
阅读次数:
187
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-22 19:46:16
阅读次数:
220
题目描述: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...
分类:
其他好文 时间:
2014-10-21 17:20:39
阅读次数:
180
// Playground - noun: a place where people can play
import UIKit
//------------------------------------------------------------------------------
// 1. 基本使用
// switch 与OC的区别:
// 1> 不需要写break
// 2> 每...
分类:
编程语言 时间:
2014-10-21 15:26:06
阅读次数:
220
problem: Given a sorted array, remove the duplicates in place such that each element appear onlyonceand return the new length.Do not allocate extra sp...
分类:
其他好文 时间:
2014-10-20 22:53:53
阅读次数:
217