参考了这个里面的代码http://bbs.csdn.net/topics/380084274一直报错06-16 23:58:50.698 26148-26161/com.example.myapplication.app W/ContentResolver﹕ Failed to get type f...
分类:
移动开发 时间:
2014-06-18 12:52:30
阅读次数:
267
Given an index k, return the kth row of the Pascal's triangle.
For example, given k = 3,
Return [1,3,3,1].
Note:
Could you optimize your algorithm to use only O(k) extra space?
思路:最简单的方法就是按...
分类:
其他好文 时间:
2014-06-18 12:40:54
阅读次数:
265
题目
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 as 2->1->4->3.
Your algorithm should use only const...
分类:
其他好文 时间:
2014-06-18 11:53:39
阅读次数:
138
有时候我们在项目中会遇到使用折线图等图形,Android的开源项目中为我们提供了很多插件,但是很多时候我们需要根据具体项目自定义这些图表,这一篇文章我们一起来看看如何在Android中使用Canvas绘制折线图。先看看绘制的效果:实现原理很简单,我就直接给出代码:package com.example.testcanvasdraw;
import java.util.ArrayList;
imp...
分类:
移动开发 时间:
2014-06-18 11:43:15
阅读次数:
360
Given two integers n and k, return all possible combinations of k numbers out of 1 ... n.
For example,
If n = 4 and k = 2, a solution is:
[
[2,4],
[3,4],
[2,3],
[1,2],
[1,3],
[1,4],
]...
分类:
其他好文 时间:
2014-06-18 11:41:52
阅读次数:
156
1、
??
Reverse Linked List II
Reverse a linked list from position m to n. Do it in-place and in one-pass.
For example:
Given 1->2->3->4->5->NULL, m =
2 and n = 4,
return 1->4->3->2->5->NULL....
分类:
其他好文 时间:
2014-06-17 23:03:12
阅读次数:
257
题目
Given n pairs of parentheses, write a function to generate all combinations of well-formed parentheses.
For example, given n = 3, a solution set is:
"((()))", "(()())", "(())()", "()...
分类:
其他好文 时间:
2014-06-17 22:59:06
阅读次数:
223
题目
Given a linked list, remove the nth node from the end of list and return its head.
For example,
Given linked list: 1->2->3->4->5, and n = 2.
After removing the second node from th...
分类:
其他好文 时间:
2014-06-17 21:38:12
阅读次数:
193
具体代码
###############################
#
# Funciton: micro_template_compile
#
# Parameter:
# [1] => template :String
# [2..n] => values for placeholder as key=value
#
# Example:
# <- micro_tem...
分类:
其他好文 时间:
2014-06-17 16:23:47
阅读次数:
172
1.写一个类继承TextView[java]view plaincopypackagecom.example.tt;importandroid.content.Context;importandroid.graphics.Rect;importandroid.util.AttributeSet;im...
分类:
其他好文 时间:
2014-06-17 15:43:33
阅读次数:
264