博客域名:http://www.xnerv.wang原标题页:https://oj.leetcode.com/problems/rotate-image/题目类型:下标计算难度评价:★★★本文地址:http://blog.csdn.net/nerv3x3/article/details/379687...
分类:
编程语言 时间:
2015-07-18 16:55:56
阅读次数:
155
https://leetcode.com/problems/generate-parentheses/递归,用两个指标left和right来标记出合法规则,之后再left和right都达到n后,满足了可以输出的条件此时,就可以把这个string压入到res中了。 1 class Solution {...
分类:
其他好文 时间:
2015-07-18 16:54:24
阅读次数:
114
from?https://leetcode.com/problems/sliding-window-maximum/ Given an array?nums, there is a sliding window of size?k?which is moving from the very left of the array to the very right. You can on...
https://leetcode.com/problems/product-of-array-except-self/第一次循环,建立left数组和right数组,通过动态规划来压缩时间复杂度。第二次循环,直接通过left和right数组相乘得到结果,并直接返回到res数组 1 class Solu...
分类:
其他好文 时间:
2015-07-18 12:29:07
阅读次数:
163
https://leetcode.com/problems/delete-node-in-a-linked-list/ 1 /** 2 * Definition for singly-linked list. 3 * struct ListNode { 4 * int val; 5 ...
分类:
其他好文 时间:
2015-07-18 12:21:58
阅读次数:
102
Swap Nodes in Pairs : https://leetcode.com/problems/swap-nodes-in-pairs/Given a linked list, swap every two adjacent nodes and return its head.For example,
Given 1->2->3->4, you should return the list...
分类:
其他好文 时间:
2015-07-18 11:04:57
阅读次数:
98
SummaryThis chapter covered a lot of ground,beginning with a look at the purpose of WCF,the problems it solves and its alignment with SOA,through disc...
分类:
其他好文 时间:
2015-07-17 18:11:33
阅读次数:
126
https://leetcode.com/problems/remove-element/ 1 class Solution { 2 public: 3 int removeElement(vector& nums, int val) { 4 int size=nums.si...
分类:
其他好文 时间:
2015-07-16 16:31:53
阅读次数:
81
44 Wildcard Matching链接:https://leetcode.com/problems/wildcard-matching/
问题描述:
Implement wildcard pattern matching with support for ‘?’ and ‘*’.'?' Matches any single character.
'*' Matches any sequen...
分类:
其他好文 时间:
2015-07-16 11:48:01
阅读次数:
106
https://leetcode.com/problems/best-time-to-buy-and-sell-stock/给出股票每一天的价格,求解只做一次交易的最佳收益方案。思路是首先建立一个存储股票每天差价的数组 diff[],其中 diff[i] = prices[i] - prices[i...
分类:
其他好文 时间:
2015-07-16 11:05:11
阅读次数:
150