码迷,mamicode.com
首页 >  
搜索关键字:leetcode 19    ( 34993个结果
[leetcode]Best Time to Buy and Sell Stock II @ Python
原题地址:https://oj.leetcode.com/problems/best-time-to-buy-and-sell-stock-ii/题意:Say you have an array for which theithelement is the price of a given stoc...
分类:编程语言   时间:2014-06-06 20:04:46    阅读次数:400
【Leetcode】Count and Say
The count-and-say sequence is the sequence of integers beginning as follows:1, 11, 21, 1211, 111221, ...1is read off as"one 1"or11.11is read off as"tw...
分类:其他好文   时间:2014-06-06 19:53:31    阅读次数:203
LeetCode:Pow(x, n)
要求Implement pow(x,n)解1. 特例n=0, 直接返回1n=1, 直接返回xn 0 ? n : -n);pow(x, index) = (index %2==1 ? pow(x, index/2)*x : pow(x, index/2));继续优化pow(x, index) = (i...
分类:其他好文   时间:2014-06-06 18:40:43    阅读次数:180
【Leetcode】Letter Combinations of a Phone Number
Given a digit string, return all possible letter combinations that the number could represent.A mapping of digit to letters (just like on the telephon...
分类:其他好文   时间:2014-06-06 17:50:38    阅读次数:284
【Leetcode】Divide Two Integers
Divide two integers without using multiplication, division and mod operator. 1 class Solution { 2 public: 3 int divide(int dividend, int divisor) ...
分类:其他好文   时间:2014-06-06 17:40:07    阅读次数:193
[leetcode]Triangle @ Python
原题地址:https://oj.leetcode.com/problems/triangle/题意:Given a triangle, find the minimum path sum from top to bottom. Each step you may move to adjacent n...
分类:编程语言   时间:2014-06-06 17:31:34    阅读次数:397
LEETCODE Remove Duplicates from Sorted List
Given a sorted linked list, delete all duplicates such that each element appear onlyonce.For example,Given1->1->2, return1->2.Given1->1->2->3->3, retu...
分类:其他好文   时间:2014-06-06 14:54:28    阅读次数:221
leetcode--Sum Root to Leaf Numbers
Given a binary tree containing digits from0-9only, each root-to-leaf path could represent a number.An example is the root-to-leaf path1->2->3which rep...
分类:其他好文   时间:2014-06-06 12:38:42    阅读次数:255
[leetcode]Distinct Subsequences @ Python
原题地址:https://oj.leetcode.com/problems/distinct-subsequences/题意:Given a stringSand a stringT, count the number of distinct subsequences ofTinS.A subseq...
分类:编程语言   时间:2014-06-06 09:59:43    阅读次数:330
LeetCode Swap Nodes in Pairs
class Solution {public: ListNode *swapPairs(ListNode *head) { ListNode *a = NULL; ListNode *b = NULL; ListNode *tail = NULL; ...
分类:其他好文   时间:2014-06-05 12:55:24    阅读次数:216
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!