码迷,mamicode.com
首页 >  
搜索关键字:should be repaired    ( 4956个结果
Leetcode-Swap Nodes in Pairs
Given a linked list, swap every two adjacent nodes and return its head. For example,Given 1->2->3->4, you should return the list as 2->1->4->3.Your al...
分类:其他好文   时间:2014-11-21 06:55:40    阅读次数:187
Telephone Number
ProblemPrint all valid phone numbers of length n subject to following constraints:If a number contains a 4, it should start with 4No two consecutive d...
分类:其他好文   时间:2014-11-21 06:54:39    阅读次数:149
Spiral Matrix II
Given an integern, generate a square matrix filled with elements from 1 ton2in spiral order.For example,Givenn=3,You should return the following matri...
分类:其他好文   时间:2014-11-20 23:21:17    阅读次数:256
【LeetCode】Single Number II (3 solutions)
Single Number IIGiven an array of integers, every element appearsthreetimes except for one. Find that single one.Note:Your algorithm should have a lin...
分类:其他好文   时间:2014-11-20 18:29:54    阅读次数:271
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 [1,1,2,...
分类:其他好文   时间:2014-11-20 17:07:45    阅读次数:194
【leetcode】Single Number (Medium) ☆
题目:Given an array of integers, every element appearstwiceexcept for one. Find that single one.Note:Your algorithm should have a linear runtime complex...
分类:其他好文   时间:2014-11-20 14:59:10    阅读次数:169
Leetcode LRU Cache
Design and implement a data structure for Least Recently Used (LRU) cache. It should support the following operations:getandset.get(key)- Get the valu...
分类:系统相关   时间:2014-11-20 13:39:25    阅读次数: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
Leetcode: Merge Two Sorted Lists
Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists.代码:class ...
分类:其他好文   时间:2014-11-19 21:47:39    阅读次数:119
Leetcode: Partition List
Given a linked list and a valuex, partition it such that all nodes less thanxcome before nodes greater than or equal tox.You should preserve the origi...
分类:其他好文   时间:2014-11-19 20:32:41    阅读次数:129
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!