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 nodes with keys less than the node's key.Th...
分类:
其他好文 时间:
2015-04-25 15:11:01
阅读次数:
135
问题描述:Determine whether an integer is a palindrome. Do this without extra space.Some hints:Could negative integers be palindromes? (ie, -1)If you are t...
分类:
编程语言 时间:
2015-04-25 14:54:15
阅读次数:
167
Write an algorithm to determine if a number is “happy”.
A happy number is a number defined by the following process: Starting with any positive integer, replace the number by the sum of the square...
分类:
移动开发 时间:
2015-04-25 00:21:22
阅读次数:
153
题目描述Given an array of non-negative integers, you are initially positioned at the first index of the array.Each element in the array represents your maximum jump length at that position.Determine if you...
分类:
其他好文 时间:
2015-04-24 21:14:14
阅读次数:
171
Path SumTotal Accepted:50593Total Submissions:169742My SubmissionsQuestionSolutionGiven a binary tree and a sum, determine if the tree has a root-to-l...
分类:
其他好文 时间:
2015-04-24 12:09:15
阅读次数:
95
Write an algorithm to determine if a number is "happy".
A happy number is a number defined by the following process: Starting with any positive integer, replace the number by the sum of the squares o...
分类:
移动开发 时间:
2015-04-24 09:03:57
阅读次数:
117
Write an algorithm to determine if a number is "happy".
A happy number is a number defined by the following process: Starting with any positive integer, replace the number by the sum of the squares...
分类:
移动开发 时间:
2015-04-23 21:46:26
阅读次数:
222
Given a string containing just the characters'(',')','{','}','['and']', determine if the input string is valid.The brackets must close in the correct ...
分类:
其他好文 时间:
2015-04-23 21:31:47
阅读次数:
127
problem:
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 ev...
分类:
其他好文 时间:
2015-04-23 15:47:04
阅读次数:
166
202 Happy numberQuestionWrite an algorithm to determine if a number is “happy”.A happy number is a number defined by the following process: Starting w...
分类:
移动开发 时间:
2015-04-23 14:58:47
阅读次数:
125