码迷,mamicode.com
首页 >  
搜索关键字:determine    ( 2744个结果
LeetCode: Validate Binary Search Tree 解题报告
Validate Binary Search TreeGiven a binary tree, determine if it is a valid binary search tree (BST).Assume a BST is defined as follows:The left subtre...
分类:其他好文   时间:2014-12-21 21:55:07    阅读次数:230
Palindrome Number(回文串)
题目: Determine whether an integer is a palindrome. Do this without extra space. 分析: 该题目来源于leetcode。回文串是一个正读和反读都一样的字符串,比如“level”或者“noon”等等就是回文串。当然整数形式的回文串也是类似的。但负数不是回文串。两种思路: 按定义来,依次比较串的首尾,直到中...
分类:其他好文   时间:2014-12-21 20:43:45    阅读次数:174
LeetCode--Valid Parentheses
这个题目我采用了两种方案,第一种方案代码行数相对较少,但效率稍低,第二种方案参照网上的进行改进代码行数相对多些,但效率稍高。 题目: Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid. The brack...
分类:其他好文   时间:2014-12-21 20:43:27    阅读次数:202
【LeetCode】Valid Parentheses
Valid ParenthesesGiven a string containing just the characters'(',')','{','}','['and']', determine if the input string is valid.The brackets must clos...
分类:其他好文   时间:2014-12-20 12:50:17    阅读次数:163
LeetCode: Path Sum 解题报告
Path SumGiven a binary tree and a sum, determine if the tree has a root-to-leaf path such that adding up all the values along the path equals the give...
分类:其他好文   时间:2014-12-18 22:11:57    阅读次数:157
LeetCode: Balanced Binary Tree 解题报告
Balanced Binary Tree Given a binary tree, determine if it is height-balanced.For this problem, a height-balanced binary tree is defined as a binary tr...
分类:其他好文   时间:2014-12-18 22:05:21    阅读次数:180
【Leetcode】Linked List Cycle
一、原题 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? 二、分析 选用两个指针扫描链表,一个速度快,一个速度慢,若两个指针相遇,说明有环。 三、...
分类:其他好文   时间:2014-12-18 20:44:05    阅读次数:157
Apache运行时寻找ServerName
[root@localhostbin]#./apachectlstarthttpd:Couldnotreliablydeterminetheserver‘sfullyqualifieddomainname,usinglocalhost.localdomainforServerName[root@localhostbin]#./apachectlstophttpd:Couldnotreliablydeterminetheserver‘sfullyqualifieddomainname,usinglocalhos..
分类:Web程序   时间:2014-12-18 19:08:27    阅读次数:177
【LeetCode】
题目 Given a binary tree, determine if it is height-balanced. For this problem, a height-balanced binary tree is defined as a binary tree in which the depth of the two subtrees of every node nev...
分类:其他好文   时间:2014-12-18 15:16:38    阅读次数:169
leetcode------Balanced Binary Tree
标题:Balanced Binary Tree通过率:32.3%难度:简单Given a binary tree, determine if it is height-balanced.For this problem, a height-balanced binary tree is define...
分类:其他好文   时间:2014-12-18 14:50:55    阅读次数:186
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!