上一页 1 ··· 3 4 5 6 7 8 9 10 11 12 下一页
摘要: 原题地址:https://oj.leetcode.com/problems/word-search/题意:Given a 2D board and a word, find if the word exists in the grid.The word can be constructed from... 阅读全文
posted @ 2014-06-05 10:23 南郭子綦 阅读(5496) 评论(0) 推荐(0) 编辑
摘要: 原题地址:https://oj.leetcode.com/problems/merge-sorted-array/题意:Given two sorted integer arrays A and B, merge B into A as one sorted array.解题思路:归并排序的归并这一... 阅读全文
posted @ 2014-06-05 09:58 南郭子綦 阅读(4098) 评论(0) 推荐(0) 编辑
摘要: 原题地址:https://oj.leetcode.com/problems/set-matrix-zeroes/题意:Given amxnmatrix, if an element is 0, set its entire row and column to 0. Do it in place.解题... 阅读全文
posted @ 2014-06-05 09:53 南郭子綦 阅读(2774) 评论(0) 推荐(0) 编辑
摘要: 原题地址:https://oj.leetcode.com/problems/restore-ip-addresses/题意:Given a string containing only digits, restore it by returning all possible valid IP add... 阅读全文
posted @ 2014-06-04 16:13 南郭子綦 阅读(3499) 评论(2) 推荐(0) 编辑
摘要: 原题地址:https://oj.leetcode.com/problems/interleaving-string/题意:Givens1,s2,s3, find whethers3is formed by the interleaving ofs1ands2.For example,Given:s1... 阅读全文
posted @ 2014-06-04 12:56 南郭子綦 阅读(2492) 评论(0) 推荐(0) 编辑
摘要: 原题地址:https://oj.leetcode.com/problems/distinct-subsequences/题意:Given a stringSand a stringT, count the number of distinct subsequences ofTinS.A subseq... 阅读全文
posted @ 2014-06-04 10:02 南郭子綦 阅读(2014) 评论(2) 推荐(0) 编辑
摘要: 原题地址:https://oj.leetcode.com/problems/pascals-triangle-ii/题意:Given an indexk, return thekthrow of the Pascal's triangle.For example, givenk= 3,Return[... 阅读全文
posted @ 2014-06-03 20:06 南郭子綦 阅读(2063) 评论(0) 推荐(0) 编辑
摘要: 原题地址:https://oj.leetcode.com/problems/pascals-triangle/题意:GivennumRows, generate the firstnumRowsof Pascal's triangle.For example, givennumRows= 5,Ret... 阅读全文
posted @ 2014-06-03 19:49 南郭子綦 阅读(2583) 评论(0) 推荐(0) 编辑
摘要: 原题地址:https://oj.leetcode.com/problems/triangle/题意:Given a triangle, find the minimum path sum from top to bottom. Each step you may move to adjacent n... 阅读全文
posted @ 2014-06-03 19:36 南郭子綦 阅读(2863) 评论(0) 推荐(0) 编辑
摘要: 算法导论上面快速排序的实现。代码:def partition(array, left, right): i = left-1 for j in range(left, right): if array[j] <= array[right]: i += ... 阅读全文
posted @ 2014-06-03 18:17 南郭子綦 阅读(1293) 评论(0) 推荐(0) 编辑
摘要: 原题地址: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-06-03 17:24 南郭子綦 阅读(3550) 评论(1) 推荐(0) 编辑
摘要: 原题地址:https://oj.leetcode.com/problems/best-time-to-buy-and-sell-stock-ii/题意:Say you have an array for which theithelement is the price of a given stoc... 阅读全文
posted @ 2014-06-03 16:15 南郭子綦 阅读(3546) 评论(0) 推荐(0) 编辑
摘要: 原题地址:https://oj.leetcode.com/problems/best-time-to-buy-and-sell-stock/题意:Say you have an array for which theithelement is the price of a given stock o... 阅读全文
posted @ 2014-06-03 15:59 南郭子綦 阅读(4924) 评论(0) 推荐(0) 编辑
摘要: 原题地址:https://oj.leetcode.com/problems/valid-palindrome/题意:Given a string, determine if it is a palindrome, considering only alphanumeric characters an... 阅读全文
posted @ 2014-06-03 15:39 南郭子綦 阅读(3518) 评论(0) 推荐(0) 编辑
摘要: 原题地址:https://oj.leetcode.com/problems/word-ladder/题意:Given two words (startandend), and a dictionary, find the length of shortest transformation seque... 阅读全文
posted @ 2014-06-03 15:28 南郭子綦 阅读(6400) 评论(2) 推荐(0) 编辑
上一页 1 ··· 3 4 5 6 7 8 9 10 11 12 下一页