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-01-14 09:52:48
阅读次数:
161
# -*- coding: utf8 -*-'''__author__ = 'dabay.wang@gmail.com'https://oj.leetcode.com/problems/palindrome-number/Determine whether an integer is a palin...
分类:
编程语言 时间:
2015-01-14 06:14:41
阅读次数:
177
A message containing letters from A-Z is being encoded to numbers using
the following mapping:
'A' -> 1
'B' -> 2
...
'Z' -> 26
Given an encoded message containing digits, determine the total nu...
分类:
编程语言 时间:
2015-01-13 21:33:22
阅读次数:
269
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...
分类:
其他好文 时间:
2015-01-13 19:55:05
阅读次数:
174
https://oj.leetcode.com/problems/linked-list-cycle/Given a linked list, determine if it has a cycle in it.Follow up:Can you solve it without using ext...
分类:
其他好文 时间:
2015-01-13 13:55:51
阅读次数:
193
Follow up for "Search in Rotated Sorted Array":
What if duplicates are allowed?
Would this affect the run-time complexity? How and why?
Write a function to determine if a given target is in the...
分类:
其他好文 时间:
2015-01-13 12:33:11
阅读次数:
118
题目:
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 a...
分类:
编程语言 时间:
2015-01-12 16:40:36
阅读次数:
221
Problem 1 [Balanced Binary Tree]Given a binary tree, determine if it is height-balanced.For this problem, a height-balanced binary tree is defined as ...
分类:
其他好文 时间:
2015-01-10 06:36:11
阅读次数:
290
CSS Specificity As mentioned above, CSS styles follow an order of specificity and point values to determine(确定) when styles override(覆盖) one another or take precedence(优先). Nettuts recently h...
分类:
Web程序 时间:
2015-01-09 22:32:39
阅读次数:
386
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-01-09 09:16:29
阅读次数:
149