https://leetcode.com/problems/n-queens/Then-queens puzzle is the problem of placingnqueens on ann×nchessboard such that no two queens attack each othe...
分类:
其他好文 时间:
2015-04-11 22:13:56
阅读次数:
137
题目地址:https://leetcode.com/problems/reverse-bits/题目分析:可以4bit为单位,0翻转对应0,1翻转对应8.....15翻转对应15,将这些翻转信息保存在数组中即可以O(1)的空间复杂度换来很好的时间复杂度题目解答:public class Soluti...
分类:
其他好文 时间:
2015-04-11 17:46:15
阅读次数:
113
During the past days,I am struggling in finding job and solve some other problems.It's really a tough time.However,the more setbacks and difficulties ...
分类:
其他好文 时间:
2015-04-11 16:13:03
阅读次数:
101
题目地址:https://leetcode.com/problems/balanced-binary-tree/题目解答:/** * Definition for binary tree * public class TreeNode { * int val; * TreeNode ...
分类:
其他好文 时间:
2015-04-11 13:13:13
阅读次数:
100
题目地址:https://leetcode.com/problems/minimum-window-substring/题目解答:import java.util.HashMap;import java.util.Map;public class Solution { public Strin...
https://leetcode.com/problems/maximum-gap/Given an unsorted array, find the maximum difference between the successive elements in its sorted form.Try ...
分类:
其他好文 时间:
2015-04-10 17:45:05
阅读次数:
176
D. Little Girl and Maximum XOR
A little girl loves problems on bitwise operations very much. Here's one of them.
You are given two integers
l and r. Let's consider the values of
for all pa...
分类:
其他好文 时间:
2015-04-10 09:40:40
阅读次数:
147
Rendering ProblemsNo Android SDK found. Please configure an Android SDK.
分类:
移动开发 时间:
2015-04-10 09:31:49
阅读次数:
404
题目地址:https://leetcode.com/problems/reverse-linked-list-ii/解题思路:1.找到需要翻转的开始节点,从开始节点其依次进行翻转,注意过程中要维护三个节点,curr,curr.next,curr.next.next2.如果开始翻转节点为1,则返回翻转...
分类:
其他好文 时间:
2015-04-10 01:20:15
阅读次数:
118
题出自https://leetcode.com/problems/rotate-image/ 内容为: You are given an n x n 2D matrix representing an image. Rotate the image by 90 degrees (clockwise)...
分类:
编程语言 时间:
2015-04-09 06:18:54
阅读次数:
165