码迷,mamicode.com
首页 >  
搜索关键字:follow    ( 4585个结果
Leetcode Linked List Cycle
Given a linked list, determine if it has a cycle in it.Follow up:Can you solve it without using extra space?这道题用来判断链表中是否有循环,最开始我想的是遍历链表,同时用一个list保存遍历过...
分类:其他好文   时间:2014-11-21 01:18:32    阅读次数:203
Linked List Cycle
Linked List CycleGiven a linked list, determine if it has a cycle in it.Follow up:Can you solve it without using extra space?这道题要用双指针,但我想试一下投机取巧的办法行不行...
分类:其他好文   时间:2014-11-20 21:46:01    阅读次数:185
Leetcode-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? ...
分类:其他好文   时间:2014-11-20 13:20:00    阅读次数:289
[leetcode]Remove Duplicates from Sorted Array II
问题描述: Follow up for "Remove Duplicates": What if duplicates are allowed at most twice? For example, Given sorted array A = [1,1,1,2,2,3], Your function should return length = 5, and A is now [...
分类:其他好文   时间:2014-11-19 22:19:08    阅读次数:138
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-11-19 20:25:11    阅读次数:248
[leetcode]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? 基本思路: 此题要求矩阵顺时针转90度。可以找出元素选择规律: i‘ = j; j...
分类:其他好文   时间:2014-11-19 11:26:21    阅读次数:128
[leetcode]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? 基本思路: 此题要求矩阵顺时针转90度。可以找出元素选择规律: i‘ = j; j...
分类:其他好文   时间:2014-11-19 01:24:29    阅读次数:154
leetcode --- Linked List Cycle [Floyd's cycle-finding algorithm]
Linked List CycleGiven a linked list, determine if it has a cycle in it.Follow up:Can you solve it without using extra space?Linked ListTwo Pointers''...
分类:其他好文   时间:2014-11-18 23:25:09    阅读次数:170
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.click to show follow up.Follow up: Did you use extra spac...
分类:其他好文   时间:2014-11-17 00:23:53    阅读次数:244
Linked List Cycle II
Given a linked list, return the node where the cycle begins. If there is no cycle, returnnull.Follow up:Can you solve it without using extra space?本来不...
分类:其他好文   时间:2014-11-16 17:10:02    阅读次数:276
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!