2014年12月30日

Validate Binary Search Tree

摘要: 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... 阅读全文

posted @ 2014-12-30 20:47 luckygxf 阅读(141) 评论(0) 推荐(0) 编辑

Binary Tree Zigzag Level Order Traversal

摘要: Given a binary tree, return thezigzag level ordertraversal of its nodes' values. (ie, from left to right, then right to left for the next level and al... 阅读全文

posted @ 2014-12-30 19:32 luckygxf 阅读(213) 评论(0) 推荐(0) 编辑

Factorial Trailing Zeroes

摘要: Given an integern, return the number of trailing zeroes inn!.Note:Your solution should be in logarithmic time complexity.只有2 * 5才会产生0只要计算出因子中2和5的个数取小的... 阅读全文

posted @ 2014-12-30 18:50 luckygxf 阅读(184) 评论(0) 推荐(0) 编辑

导航