John is going on a fishing trip. He has h hours available (1 <= h <= 16), and there are n lakes in the area (2 <= n <= 25) all reachable along a single, one-way road. John starts at lake 1, but he can finish at any lake he wants. He can only travel from on...
分类:
其他好文 时间:
2014-05-07 08:48:52
阅读次数:
515
【题目】
原文:
1.3 Design an algorithm and write code to remove the duplicate characters in a string without using any additional buffer. NOTE: One or two additional variables are fine. An
extra copy of...
分类:
其他好文 时间:
2014-05-07 08:48:12
阅读次数:
372
public class LinkedList {
Node head = null;
Node tail = null;
int length = 0;
public void add(Object object) {
Node node = new Node(object, null);
if (head == null) {
head = tail = nod...
分类:
其他好文 时间:
2014-05-07 08:24:17
阅读次数:
306
public class ArrayList {
Object[] objects = new Object[10];
int index = 0;
public void add(Object object) {
if (index == objects.length) {
Object[] newObjects = new Object[objects.length*2];
...
分类:
其他好文 时间:
2014-05-07 07:57:10
阅读次数:
257
1、实现源码
JavaScript实现获取table中某一列的值
function getTdValue()
{
var tableId = document.getElementById("tab");
var str = "";
for(var i=1;i<tableId.rows.length;i++)
{
alert(tableId.row...
分类:
编程语言 时间:
2014-05-07 06:27:47
阅读次数:
478
The number of steps
Time Limit: 1000ms Memory limit: 65536K 有疑问?点这里^_^
题目描述
Mary stands in a strange maze, the maze looks like a triangle(the first layer have one room,the seco...
分类:
其他好文 时间:
2014-05-07 06:15:59
阅读次数:
427
The gray code is a binary numeral system where two successive values differ in only one bit.
Given a non-negative integer n representing the total number of bits in the code, print the sequence of gr...
分类:
其他好文 时间:
2014-05-07 06:10:17
阅读次数:
370
One evening Johnny found some funny looking beens in his grandfather's garden shed, and decided to plant one of them. Next morning, to his surprise he found an enormous beanstalk growing in his back y...
分类:
其他好文 时间:
2014-05-07 05:17:42
阅读次数:
303
Description
Squares and rectangles fascinated the famous Dutch painter Piet Mondriaan. One night, after producing the drawings in his 'toilet series' (where he had to use his toilet paper to draw on,...
分类:
其他好文 时间:
2014-05-07 05:16:29
阅读次数:
385
AssertionError继承Error,提供了多个构造方法,代码如下:
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this w...
分类:
其他好文 时间:
2014-05-07 03:20:22
阅读次数:
579