Given a linked list, return the node where the cycle begins. If there is no cycle, return null.
Follow up:
Can you solve it without using extra space?
思路:由【Leetcode】Linked
List Cycle可知,利用一快一慢...
分类:
其他好文 时间:
2014-06-15 14:23:38
阅读次数:
288
初始化异步树直接全部展开代码:
$(function(){
$('#tt').tree({
url:'/treeInit',
lines:true,
onLoadSuccess:function(node,data){
var t = $(this);
if(data){
$(data).each(f...
分类:
其他好文 时间:
2014-06-15 13:30:02
阅读次数:
242
jQuery实现table隔行换色和鼠标经过变色
一、隔行换色
$("tr:odd").css("background-color","#eeeeee");
$("tr:even").css("background-color","#ffffff");
或者一行搞定:
$("table tr:nth-child(odd)").css("background-color","#eeeeee");
二、鼠标经过变色
$("tr").live({
mouseover:function(){
$(this)....
分类:
Web程序 时间:
2014-06-15 10:15:32
阅读次数:
329
String saveFolder = "C:\\";Preferences pref = Preferences.userRoot().node(this.getClass().getName());String lastPath = pref.get("lastPath", "");JFileC...
分类:
其他好文 时间:
2014-06-15 07:39:42
阅读次数:
447
写得很好: http://blog.csdn.net/hitwhylz/article/details/19689567CCNode类的setPosition,getPosition函数如果是一个Node的Child则获取的坐标就是该Node的本地坐标(原点为父节点左下角)。 另一个关键问...
分类:
其他好文 时间:
2014-06-15 06:25:50
阅读次数:
203
一年前,准备使用mongDb自带的map,reduce功能模拟hadoop,换个思路做一个简易的大数据分拆再结合存储的办法;这个功能可以用于数据日志或者游戏数据之类,进行周期性归纳和按照自己需求重组数据;以下代码实现了将每日数据collecttion:gameLog日期的数据统计出不同的collec...
分类:
数据库 时间:
2014-06-14 22:38:35
阅读次数:
432
Question:Given a binary tree, find the maximum path sum.The path may start and end at any node in the tree.For example:Given the below binary tree, .....
分类:
其他好文 时间:
2014-06-14 20:59:07
阅读次数:
188
Given a linked list, return the node where the cycle begins. If there is no cycle, return null.Follow up: Can you solve it without using extra space?比...
分类:
其他好文 时间:
2014-06-14 15:48:59
阅读次数:
217
#include
#include
using namespace std;
struct Node{
int x, y;
friend bool operator b.x; //x最小的节点在队首
}
};
int main(){
priority_queue PQ;
Node temp = {2, 3};
PQ...
分类:
其他好文 时间:
2014-06-14 14:03:20
阅读次数:
355
独立链表是解决哈希冲突的一种办法。它的基本思想就是将哈希值相互冲突的几个对象放到一个链表中。
代码
public class HashST {
private static class Node {
Object key; // 由于无法创建泛型数组,只能将对象设置为Object类
Object value;
Node n...
分类:
其他好文 时间:
2014-06-14 10:04:26
阅读次数:
206