Remove Nth Node From End of ListGiven a linked list, remove thenthnode from the end of list and return its head.For example, Given linked list: 1->2.....
分类:
其他好文 时间:
2014-07-22 22:53:35
阅读次数:
220
Rotate ListGiven a list, rotate the list to the right bykplaces, wherekis non-negative.For example:Given1->2->3->4->5->NULLandk=2,return4->5->1->2->3-...
分类:
其他好文 时间:
2014-07-22 22:52:59
阅读次数:
210
package com.example.sharepreferen;import android.content.Context;import android.content.SharedPreferences;import android.content.SharedPreferences.Edi...
分类:
移动开发 时间:
2014-07-19 22:38:25
阅读次数:
277
Swap Nodes in PairsGiven a linked list, swap every two adjacent nodes and return its head.For example,Given1->2->3->4, you should return the list as2-...
分类:
其他好文 时间:
2014-07-19 22:25:10
阅读次数:
210
package com.example.sdoperation;import java.io.BufferedReader;import java.io.File;import java.io.FileInputStream;import java.io.FileNotFoundException;...
分类:
移动开发 时间:
2014-07-19 18:33:46
阅读次数:
283
Strictly speaking, a function can only return one value, but if the value is a tuple, the effect is the same as returning multiple values. For example...
分类:
其他好文 时间:
2014-07-19 18:31:23
阅读次数:
208
Given a strings, partitionssuch that every substring of the partition is a palindrome.Return all possible palindrome partitioning ofs.For example, giv...
分类:
其他好文 时间:
2014-07-19 14:20:14
阅读次数:
178
在Mahout 学习(三)中,我贴了example的代码,里面生成向量文件的代码:InputDriver.runJob(input, directoryContainingConvertedInput, "org.apache.mahout.math.RandomAccessSparseVector...
分类:
其他好文 时间:
2014-07-19 14:14:04
阅读次数:
218
Given a binary tree, flatten it to a linked list in-place.
For example,
Given
1
/ 2 5
/ \ 3 4 6
The flattened tree should look like:
1...
分类:
其他好文 时间:
2014-07-19 11:47:54
阅读次数:
168
如何实现点击按钮,弹出“正在加载数据,请稍候...”对话框,加载完了之后,对话框自动消失呢?
其实也是很简单的看下面代码:
import com.farsunset.ichat.example.R;
import android.os.Bundle;
import android.app.Activity;
import android.app.ProgressDialog;
publi...
分类:
移动开发 时间:
2014-07-19 02:17:16
阅读次数:
241