Loading

上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 16 下一页
摘要: 题目描述:Swap Nodes in PairsGiven a linked list, swap every two adjacent nodes and return its head.For example,Given1->2->3->4, you should return the list... 阅读全文
posted @ 2015-02-07 16:17 Yano_nankai 阅读(120) 评论(0) 推荐(0)
摘要: 题目要求:Merge k Sorted ListsMergeksorted linked lists and return it as one sorted list. Analyze and describe its complexity.AnalysisThe simplest solution... 阅读全文
posted @ 2015-02-07 16:13 Yano_nankai 阅读(128) 评论(0) 推荐(0)
摘要: 题目描述:Generate ParenthesesGivennpairs of parentheses, write a function to generate all combinations of well-formed parentheses.For example, givenn= 3, ... 阅读全文
posted @ 2015-02-07 16:08 Yano_nankai 阅读(117) 评论(0) 推荐(0)
摘要: 题目描述:Valid ParenthesesGiven a string containing just the characters'(',')','{','}','['and']', determine if the input string is valid.The brackets must... 阅读全文
posted @ 2015-02-07 15:56 Yano_nankai 阅读(92) 评论(0) 推荐(0)
摘要: 题目描述:Remove Nth Node From End of ListGiven a linked list, remove thenthnode from the end of list and return its head.For example, Given linked list:... 阅读全文
posted @ 2015-02-07 15:50 Yano_nankai 阅读(117) 评论(0) 推荐(0)
摘要: 题目描述:4SumGiven an arraySofnintegers, are there elementsa,b,c, anddinSsuch thata+b+c+d= target? Find all unique quadruplets in the array which gives th... 阅读全文
posted @ 2015-02-07 15:43 Yano_nankai 阅读(116) 评论(0) 推荐(0)
摘要: 题目描述:Letter Combinations of a Phone NumberGiven a digit string, return all possible letter combinations that the number could represent.A mapping of d... 阅读全文
posted @ 2015-02-07 15:37 Yano_nankai 阅读(136) 评论(0) 推荐(0)
摘要: 题目描述:3Sum ClosestGiven an arraySofnintegers, find three integers inSsuch that the sum is closest to a given number, target. Return the sum of the thre... 阅读全文
posted @ 2015-02-07 15:32 Yano_nankai 阅读(128) 评论(0) 推荐(0)
摘要: 题目描述:3SumGiven an arraySofnintegers, are there elementsa,b,cinSsuch thata+b+c= 0? Find all unique triplets in the array which gives the sum of zero.No... 阅读全文
posted @ 2015-02-07 15:22 Yano_nankai 阅读(100) 评论(0) 推荐(0)
摘要: 题目描述:Longest Common PrefixWrite a function to find the longest common prefix string amongst an array of strings.代码如下:class Solution {public: string... 阅读全文
posted @ 2015-02-07 15:01 Yano_nankai 阅读(133) 评论(0) 推荐(0)
上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 16 下一页