Description:In this kata you should simply determine, whether a given year is a leap year or not. In case you don't know the rules, here they are:year...
分类:
其他好文 时间:
2015-07-05 21:09:20
阅读次数:
121
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...
分类:
移动开发 时间:
2015-07-05 14:53:40
阅读次数:
127
Given a string containing just the characters '(', ')', '{', '}', '[' and ']',
determine if the input string is valid.
The brackets must close in the correct order, "()" and "()[]{}" are
all va...
分类:
其他好文 时间:
2015-07-05 09:46:08
阅读次数:
95
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.For example:
Given the below binary tree and sum = 2...
分类:
其他好文 时间:
2015-07-04 15:32:56
阅读次数:
95
题目出处:https://leetcode.com/problems/palindrome-number/
题目:Determine whether an integer is a palindrome. Do this without extra space.
翻译:判断一个整型数是否是回文数
思路:将整型数转化为字符串,依次比较首尾
代码:
public class Solution...
分类:
其他好文 时间:
2015-07-04 14:08:01
阅读次数:
171
Balanced Binary Tree : https://leetcode.com/problems/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...
分类:
其他好文 时间:
2015-07-03 15:51:33
阅读次数:
118
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...
分类:
其他好文 时间:
2015-07-03 13:55:42
阅读次数:
97
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-07-03 09:15:07
阅读次数:
131
Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases.For example,
“A man, a plan, a canal: Panama” is a palindrome.
“race a car” is not a palin...
分类:
其他好文 时间:
2015-07-02 22:38:27
阅读次数:
132
称号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....
分类:
其他好文 时间:
2015-07-02 19:21:40
阅读次数:
98