10 2014 档案

[leetcode] Search in Rotated Sorted Array @ Python [Figure][自配插图说明]
摘要:Suppose a sorted array is rotated at some pivot unknown to you beforehand.(i.e.,0 1 2 4 5 6 7might become4 5 6 7 0 1 2).You are given a target value t... 阅读全文

posted @ 2014-10-22 23:37 AIDasr 阅读(333) 评论(0) 推荐(0) 编辑

[leetcode] Find Minimum in Rotated Sorted Array @ Python
摘要:source:https://oj.leetcode.com/problems/find-minimum-in-rotated-sorted-array/Suppose a sorted array is rotated at some pivot unknown to you beforehand... 阅读全文

posted @ 2014-10-21 05:16 AIDasr 阅读(689) 评论(0) 推荐(0) 编辑

[leetcode] Unique Binary Search Trees @ Python
摘要: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-15 22:50 AIDasr 阅读(655) 评论(0) 推荐(0) 编辑

[leetcode] Longest Common Prefix @ Python
摘要:Source:https://oj.leetcode.com/problems/longest-common-prefix/Write a function to find the longest common prefix string amongst an array of strings.Hi... 阅读全文

posted @ 2014-10-13 22:33 AIDasr 阅读(734) 评论(0) 推荐(0) 编辑

[leetcode] path sum @ Python [recursion]
摘要: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.Fo... 阅读全文

posted @ 2014-10-13 00:22 AIDasr 阅读(565) 评论(0) 推荐(0) 编辑

[leetcode]Distinct Subsequences @ Python
摘要:原题地址:https://oj.leetcode.com/problems/distinct-subsequences/题意:Given a stringSand a stringT, count the number of distinct subsequences ofTinS.A subseq... 阅读全文

posted @ 2014-10-07 22:20 AIDasr 阅读(1167) 评论(0) 推荐(1) 编辑

[leetcode]Best Time to Buy and Sell Stock III @ Python
摘要:原题地址:https://oj.leetcode.com/problems/best-time-to-buy-and-sell-stock-iii/题意:Say you have an array for which theithelement is the price of a given sto... 阅读全文

posted @ 2014-10-06 22:55 AIDasr 阅读(1096) 评论(0) 推荐(0) 编辑

[leetcode]Populating Next Right Pointers in Each Node @ Python [逻辑动力学]
摘要:(坦率的说,这道题目感动了我, 让我这个编程新手体验到了逻辑的美)原题地址:https://oj.leetcode.com/problems/populating-next-right-pointers-in-each-node/题意: 1 / \ 2 ... 阅读全文

posted @ 2014-10-01 11:28 AIDasr 阅读(754) 评论(0) 推荐(0) 编辑

[leetcode] Longest Valid Parentheses @python
摘要:Given a string containing just the characters'('and')', find the length of the longest valid (well-formed) parentheses substring.For"(()", the longest... 阅读全文

posted @ 2014-10-01 07:20 AIDasr 阅读(468) 评论(0) 推荐(0) 编辑

[leetcode] Valid Parentheses @Python
摘要:https://oj.leetcode.com/problems/valid-parentheses/Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the inp... 阅读全文

posted @ 2014-10-01 00:07 AIDasr 阅读(784) 评论(1) 推荐(0) 编辑

导航

点击右上角即可分享
微信分享提示