码迷,mamicode.com
首页 >  
搜索关键字:problems    ( 6275个结果
8# String to Integer (atoi)
题目链接:https://leetcode.com/problems/string-to-integer-atoi/ Implement atoi to convert a string to an integer. Hint: Carefully consider all possible input cases. If you want a challenge, ple...
分类:其他好文   时间:2015-06-21 14:30:06    阅读次数:142
leetcode 224 Basic Calculator
1. 问题描述  计算字符串表达式的值,表达式中只含有(,),+,-,空格和非负整数。例如:   “1 + 1” = 2   ” 2-1 + 2 ” = 3   “(1+(4+5+2)-3)+(6+8)” = 23   原文链接:https://leetcode.com/problems/basic-calculator/2. 方法与思路2.1 利用后缀表达式计算  一种思路是按照常规的方法...
分类:其他好文   时间:2015-06-21 09:23:02    阅读次数:118
Minimum Size Subarray Sum
https://leetcode.com/problems/minimum-size-subarray-sum/Given an array ofnpositive integers and a positive integers, find the minimal length of a suba...
分类:其他好文   时间:2015-06-20 18:26:47    阅读次数:130
利用二叉树的先序和中序(中序和后序)排列构建二叉树
题目来自于: https://leetcode.com/problems/construct-binary-tree-from-preorder-and-inorder-traversal/ 这一题目其实我想说的还不是我的代码,是之前在写代码中遇到的一个bug问题。后面会进行详细的解释 Construct Binary Tree from Preorder and Inord...
分类:其他好文   时间:2015-06-19 01:34:03    阅读次数:146
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(21):Merge Two Sorted Lists
https://leetcode.com/problems/merge-two-sorted-lists/Merge two sorted linked lists and return it as a new list. The new list should be made by splicin...
分类:其他好文   时间:2015-06-18 23:57:12    阅读次数:141
[LeetCode]Palindrome Number
题意:又是回文判断:该数是否是回文数原题来自:https://leetcode.com/problems/palindrome-number/分析:回文真多,直接把数反转来判断是否相等。 1 class Solution { 2 public: 3 bool isPalindrome(int...
分类:其他好文   时间:2015-06-18 21:42:04    阅读次数:114
13 Roman to Integer
13 Roman to Integer链接:https://leetcode.com/problems/roman-to-integer/ 问题描述: Given a roman numeral, convert it to an integer.Input is guaranteed to be within the range from 1 to 3999.Hide Tags Math St...
分类:其他好文   时间:2015-06-18 09:47:10    阅读次数:167
12 Integer to Roman
12 Integer to Roman链接:https://leetcode.com/problems/integer-to-roman/ 问题描述: Given an integer, convert it to a roman numeral.Input is guaranteed to be within the range from 1 to 3999.Hide Tags Math St...
分类:其他好文   时间:2015-06-18 09:45:27    阅读次数:170
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!