
leetcode
文章平均质量分 58
SupportScalarMachine
Learning Algorithm & Machine Learning.
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
Leetcode 48: Rotate Image
Problem: You are given an n x n 2D matrix representing an image. Rotate the image by 90 degrees (clockwise). Follow up: Could you do this in-place? 利用处于中心的极坐标变换: (r′t,θ′t)=(r,θ−π/2)(r_t原创 2015-05-15 23:59:06 · 305 阅读 · 0 评论 -
Leetcode : Maximum Subarray
Find the contiguous subarray within an array (containing at least one number) which has the largest sum. For example, given the array [−2,1,−3,4,−1,2,1,−5,4], the contiguous subarray [4,−1,2,1] h原创 2015-05-16 00:29:48 · 297 阅读 · 0 评论 -
Leetcode No.50: Pow(x, n)
Problem: Implement pow(x, n). 想法是是利用二分法,先算出xi,i≤nx^i, i \leq n, 剩下的递归求解。__author__ = 'burger'class Solution: # @param {float} x # @param {integer} n # @return {float} def myPow(self原创 2015-05-15 21:24:49 · 542 阅读 · 0 评论 -
Leetcode: Wildcard Matching
Problem Problem: ‘?’ Matches any single character. ‘*’ Matches any sequence of characters (including the empty sequence). The matching should cover the entire input string (not partial).原创 2015-05-16 14:16:32 · 350 阅读 · 0 评论 -
Leetcode: Word Break
Word Break Given a string s and a dictionary of words dict, determine if s can be segmented into a space-separated sequence of one or more dictionary words. For example, given s = “leetcode”,原创 2015-05-17 03:15:27 · 304 阅读 · 0 评论