码迷,mamicode.com
首页 >  
搜索关键字:in-place    ( 1961个结果
LeetCode:Reverse LinkedListⅡ
Problem: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...
分类:其他好文   时间:2015-06-24 12:52:00    阅读次数:106
Leetcode 38 Sudoku Solver
Sudoku Solver class Solution: # @param {character[][]} board # @return {void} Do not return anything, modify board in-place instead. def solveSudoku(self, board): def c...
分类:其他好文   时间:2015-06-23 12:01:45    阅读次数:125
leetcode_73_Set Matrix Zeroes
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. Follow up: Did you use extra space? A s...
分类:其他好文   时间:2015-06-22 11:12:40    阅读次数:113
leetcode_48_Rotate Image
Rotate Image   欢迎大家阅读参考,如有错误或疑问请留言纠正,谢谢 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?...
分类:其他好文   时间:2015-06-22 11:11:54    阅读次数:116
leetcode:Reverse Linked List II
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...
分类:其他好文   时间:2015-06-20 17:00:23    阅读次数:93
LeetCode(27)题解:Remove Element
https://leetcode.com/problems/remove-element/Given an array and a value, remove all instances of that value in place and return the new length.The ord...
分类:其他好文   时间:2015-06-19 01:26:31    阅读次数:146
LeetCode(26)题解:Remove Duplicates from Sorted Array
https://leetcode.com/problems/remove-duplicates-from-sorted-array/Given a sorted array, remove the duplicates in place such that each element appear o...
分类:其他好文   时间:2015-06-19 01:22:40    阅读次数:118
leetCode(11):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, n satisfy t...
分类:其他好文   时间:2015-06-18 17:26:10    阅读次数:110
swift Switch
//: Playground - noun: a place where people can playimport UIKitvar str = "Hello, playground"var a = 5switch a { case 4: println("yes") default: p...
分类:编程语言   时间:2015-06-18 00:37:25    阅读次数:249
leetcode第27题:删除vector数组的元素(array)
题目: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-06-17 23:23:07    阅读次数:216
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!