码迷,mamicode.com
首页 >  
搜索关键字:determine    ( 2744个结果
Tree
You are to determine the value of the leaf node in a given binary tree that is the terminal node of a path of least value from the root of the binary tree to any leaf. The value of a path is the sum o...
分类:其他好文   时间:2014-11-11 22:57:13    阅读次数:280
Valid Parentheses
Valid ParenthesesGiven a string containing just the characters'(',')','{','}','['and']', determine if the input string is valid.The brackets must clos...
分类:其他好文   时间:2014-11-11 22:24:21    阅读次数:201
LeetCode: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? 思路:初始化一个快指针fast,一个慢指针slow。快指针一次移动两个单位,慢指针一次移动一个单位。如果链表有环,则两指针必然会相遇。否则若fas...
分类:其他好文   时间:2014-11-11 16:40:35    阅读次数:208
Linked List Cycle(11)
Given a linked list, determine if it has a cycle in it. Follow up:Can you solve it without using extra space?怎样判断一个链表之中是否有环?可以利用快慢指针的方法。定义两个指针fast和slo...
分类:其他好文   时间:2014-11-10 23:15:29    阅读次数:289
[LeetCode] Path Sum
Given 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 given sum.Fo...
分类:其他好文   时间:2014-11-09 23:41:43    阅读次数:201
Validate Binary Search Tree(DFS)
Given a binary tree, determine if it is a valid binary search tree (BST).Assume a BST is defined as follows:The left subtree of a node contains only n...
分类:其他好文   时间:2014-11-09 16:41:17    阅读次数:122
[LeetCode] Valid Palindrome
Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases.For example,"A man, a plan, a canal: Pana...
分类:其他好文   时间:2014-11-09 15:07:01    阅读次数:129
Leetcode-Validate BST
Given a binary tree, determine if it is a valid binary search tree (BST).Assume a BST is defined as follows:The left subtree of a node contains only n...
分类:其他好文   时间:2014-11-09 06:19:31    阅读次数:173
Leetcode-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 tree in which the depth...
分类:其他好文   时间:2014-11-09 00:55:08    阅读次数:250
nyoj 130 同样的雪花 【哈希】
同样的雪花时间限制:1000ms | 内存限制:65535KB难度:4描写叙述You may have heard that no two snowflakes are alike. Your task is to write a program to determine whether this ...
分类:其他好文   时间:2014-11-08 20:48:27    阅读次数:139
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!