上一页 1 ··· 30 31 32 33 34 35 36 37 38 ··· 49 下一页
摘要: 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 dept 阅读全文
posted @ 2017-10-21 22:18 daniel456 阅读(143) 评论(0) 推荐(0)
摘要: Given an array where elements are sorted in ascending order, convert it to a height balanced BST. 题目含义:给定了一个升序的数组,转换成一个平衡二叉树 阅读全文
posted @ 2017-10-21 17:46 daniel456 阅读(121) 评论(0) 推荐(0)
摘要: Given a binary tree, return the bottom-up level order traversal of its nodes' values. (ie, from left to right, level by level from leaf to root). For 阅读全文
posted @ 2017-10-21 17:43 daniel456 阅读(111) 评论(0) 推荐(0)
摘要: Given a binary tree, find its maximum depth. The maximum depth is the number of nodes along the longest path from the root node down to the farthest l 阅读全文
posted @ 2017-10-21 17:37 daniel456 阅读(136) 评论(0) 推荐(0)
摘要: Given two binary trees, write a function to check if they are equal or not. Two binary trees are considered equal if they are structurally identical a 阅读全文
posted @ 2017-10-21 17:14 daniel456 阅读(82) 评论(0) 推荐(0)
摘要: You are given a binary tree in which each node contains an integer value. Find the number of paths that sum to a given value. The path does not need t 阅读全文
posted @ 2017-10-21 17:13 daniel456 阅读(125) 评论(0) 推荐(0)
摘要: The set S originally contains numbers from 1 to n. But unfortunately, due to the data error, one of the numbers in the set got duplicated to another n 阅读全文
posted @ 2017-10-20 21:53 daniel456 阅读(140) 评论(0) 推荐(0)
摘要: Find the nth digit of the infinite integer sequence 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, ... Note:n is positive and will fit within the range of a 32-bi 阅读全文
posted @ 2017-10-20 21:43 daniel456 阅读(141) 评论(0) 推荐(0)
摘要: Given a non-negative integer c, your task is to decide whether there're two integers a and b such that a2 + b2 = c. Example 1: Example 2: 阅读全文
posted @ 2017-10-20 21:13 daniel456 阅读(112) 评论(0) 推荐(0)
摘要: We define the Perfect Number is a positive integer that is equal to the sum of all its positive divisors except itself. Now, given an integer n, write 阅读全文
posted @ 2017-10-20 21:04 daniel456 阅读(155) 评论(0) 推荐(0)
上一页 1 ··· 30 31 32 33 34 35 36 37 38 ··· 49 下一页