原题链接:https://leetcode.com/problems/number-of-islands/题意描述:Given a 2d grid map of'1's (land) and'0's (water), count the number of islands. An island is...
分类:
其他好文 时间:
2015-04-08 21:09:58
阅读次数:
131
题目地址:https://leetcode.com/problems/rising-temperature/题目解答:# Write your MySQL query statement belowselect w1.Id from Weather w1 inner joinWeather w2 o...
分类:
其他好文 时间:
2015-04-08 12:35:18
阅读次数:
113
题目地址:https://leetcode.com/problems/wildcard-matching/动态规划解答:public class Solution { public boolean isMatch(String s, String p) { if(p.length...
分类:
其他好文 时间:
2015-04-08 10:35:44
阅读次数:
145
在eclipse中的工程中有叉叉,并且不是编译的错。那么,让eclipse自己告诉你原因吧。菜单Window->ShowView->Problems然后就去解决相应的Problems。注意:与Window->ShowView->Error Log 不同。
分类:
系统相关 时间:
2015-04-08 00:58:14
阅读次数:
174
题目连接:https://leetcode.com/problems/remove-nth-node-from-end-of-list//** * Definition for singly-linked list. * struct ListNode { * int val; * ...
分类:
其他好文 时间:
2015-04-07 19:34:12
阅读次数:
95
题目地址:https://leetcode.com/problems/number-of-1-bits/解答:public class Solution { // you need to treat n as an unsigned value public int hammingWei...
分类:
其他好文 时间:
2015-04-07 19:14:44
阅读次数:
71
# -*- coding: utf8 -*-'''__author__ = 'dabay.wang@gmail.com'56: Merge Intervalshttps://oj.leetcode.com/problems/merge-intervals/Given a collection of ...
分类:
编程语言 时间:
2015-04-07 07:08:17
阅读次数:
158
# -*- coding: utf8 -*-'''__author__ = 'dabay.wang@gmail.com'55: Jump Gamehttps://leetcode.com/problems/jump-game/Given an array of non-negative intege...
分类:
编程语言 时间:
2015-04-07 07:06:39
阅读次数:
232
题目链接:https://leetcode.com/problems/reverse-words-in-a-string/反转字符串的方法有很多种。要求空间复杂度是常数的话,可以先反转所有的单词,然后反转整个字符串。例如"the sky is blue",可以先反转为"eht yks si eulb...
分类:
其他好文 时间:
2015-04-06 21:29:12
阅读次数:
155
原题链接:https://leetcode.com/problems/binary-tree-right-side-view/题意描述:Given a binary tree, imagine yourself standing on therightside of it, return the v...
分类:
其他好文 时间:
2015-04-06 18:40:00
阅读次数:
125