上一页 1 ··· 30 31 32 33 34

2015年3月4日

Unique Binary Search Trees

摘要: Unique Binary Search Trees 问题: Given n, how many structurally unique BST's (binary search trees) that store values 1...n? For example,Given n = 3, the 阅读全文

posted @ 2015-03-04 14:30 zhouzhou0615 阅读(110) 评论(0) 推荐(0) 编辑

Best Time to Buy and Sell Stock II

摘要: Best Time to Buy and Sell Stock II 问题: Say you have an array for which the ith element is the price of a given stock on day i. Design an algorithm to 阅读全文

posted @ 2015-03-04 10:51 zhouzhou0615 阅读(154) 评论(0) 推荐(0) 编辑

Same Tree

摘要: Same Tree 问题: Given two binary trees, write a function to check if they are equal or not. Two binary trees are considered equal if they are structural 阅读全文

posted @ 2015-03-04 10:45 zhouzhou0615 阅读(184) 评论(0) 推荐(0) 编辑

Maximum Depth of Binary Tree

摘要: Maximum Depth of Binary Tree 问题: Given a binary tree, find its maximum depth. The maximum depth is the number of nodes along the longest path from the 阅读全文

posted @ 2015-03-04 10:42 zhouzhou0615 阅读(107) 评论(0) 推荐(0) 编辑

Single Number

摘要: Single Number 问题: Given an array of integers, every element appears twice except for one. Find that single one. 思路: 异或 我的方法: public class Solution { p 阅读全文

posted @ 2015-03-04 10:37 zhouzhou0615 阅读(99) 评论(0) 推荐(0) 编辑

上一页 1 ··· 30 31 32 33 34

导航