# -*- coding: utf8 -*-'''__author__ = 'dabay.wang@gmail.com'54: Spiral Matrixhttps://leetcode.com/problems/spiral-matrix/Given a matrix of m x n eleme...
分类:
编程语言 时间:
2015-03-30 22:47:29
阅读次数:
222
# -*- coding: utf8 -*-'''__author__ = 'dabay.wang@gmail.com'53: Maximum Subarrayhttps://leetcode.com/problems/maximum-subarray/Find the contiguous sub...
分类:
编程语言 时间:
2015-03-30 22:30:08
阅读次数:
195
链接: click here~~
题意:
According to a research, VIM users tend to have shorter fingers, compared with Emacs users.
Hence they prefer problems short, too. Here is a short one:
Given n (1 18), Y...
分类:
其他好文 时间:
2015-03-30 13:20:40
阅读次数:
152
题意:链表大数的加法处理,不过链表上的数是反序的。本题来源:https://leetcode.com/problems/add-two-numbers/分析:1.如果其中链表为空,则不用计算了;如果两个链表都为空,则返回空(链表不熟)。 1 /** 2 * Definition for singl....
分类:
其他好文 时间:
2015-03-30 12:57:04
阅读次数:
101
题意:给一个整数的数组和目标值,找出这个数组中的两个元素的和为该目标值的元素的下标。本题来源:https://leetcode.com/problems/two-sum/ 1 struct Node 2 { 3 int val; 4 int index; 5 Node(){}...
分类:
其他好文 时间:
2015-03-30 12:37:42
阅读次数:
98
9017. Amazing Mazes
Constraints
Time Limit: 1 secs, Memory Limit: 256 MB
Description
You are requested to solve maze problems. Without passing through these mazes, you ...
分类:
其他好文 时间:
2015-03-30 09:18:21
阅读次数:
188
https://leetcode.com/problems/distinct-subsequences/Given a stringSand a stringT, count the number of distinct subsequences ofTinS.A subsequence of a ...
分类:
其他好文 时间:
2015-03-29 17:45:56
阅读次数:
146
https://leetcode.com/problems/sort-list/Sort a linked list inO(nlogn) time using constant space complexity.解题思路:常见的O(nlogn)算法,快速排序、归并排序,堆排序。大概讲讲优缺点,在数...
分类:
其他好文 时间:
2015-03-28 21:32:10
阅读次数:
114
问题来源:https://leetcode.com/problems/binary-tree-level-order-traversal/package cn.edu.shu;import java.util.ArrayList;
import java.util.LinkedList;
import java.util.List;
import java.util.Queue;/**
*
*...
分类:
其他好文 时间:
2015-03-28 11:34:43
阅读次数:
155
# -*- coding: utf8 -*-'''__author__ = 'dabay.wang@gmail.com'52: N-Queens IIhttps://oj.leetcode.com/problems/n-queens-ii/Follow up for N-Queens problem...
分类:
编程语言 时间:
2015-03-27 23:52:53
阅读次数:
409