摘要: Givenn, how many structurally uniqueBST's(binary search trees) that store values 1...n?For example,Givenn= 3, there are a total of 5 unique BST's. 1... 阅读全文
posted @ 2014-10-16 15:25 Phoebe815 阅读(136) 评论(0) 推荐(0) 编辑
摘要: Say you have an array for which theithelement is the price of a given stock on dayi.Design an algorithm to find the maximum profit. You may complete a... 阅读全文
posted @ 2014-10-16 13:56 Phoebe815 阅读(107) 评论(0) 推荐(0) 编辑
摘要: Say you have an array for which theithelement is the price of a given stock on dayi.Design an algorithm to find the maximum profit. You may complete a... 阅读全文
posted @ 2014-10-16 12:52 Phoebe815 阅读(117) 评论(0) 推荐(0) 编辑
摘要: Say you have an array for which theithelement is the price of a given stock on dayi.If you were only permitted to complete at most one transaction (ie... 阅读全文
posted @ 2014-10-16 06:30 Phoebe815 阅读(128) 评论(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 an... 阅读全文
posted @ 2014-10-16 06:12 Phoebe815 阅读(123) 评论(0) 推荐(0) 编辑
摘要: Reverse digits of an integer.Example1:x = 123, return 321Example2:x = -123, return -321click to show spoilers.Have you thought about this?Here are som... 阅读全文
posted @ 2014-10-16 06:11 Phoebe815 阅读(100) 评论(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 le... 阅读全文
posted @ 2014-10-16 05:03 Phoebe815 阅读(115) 评论(0) 推荐(0) 编辑
摘要: Given an array of integers, every element appearstwiceexcept for one. Find that single one.Note:Your algorithm should have a linear runtime complexity... 阅读全文
posted @ 2014-10-16 04:55 Phoebe815 阅读(128) 评论(0) 推荐(0) 编辑
摘要: 2014/10/15Leetcode第一刷总算结束,时间拖太长了,希望第二遍能快一点,争取一个月能刷完第二遍??哈哈哈哈 阅读全文
posted @ 2014-10-16 04:41 Phoebe815 阅读(565) 评论(0) 推荐(0) 编辑