只显示主题贴
就这句话a method that returns the first available slot after the current time of a given duration.举个例子:
你现在有个1个小时的会议要安排,这个method应该返回一个空余的时间段给此会议。
- 进入论坛 招聘求职 版
Create a "Diary" class that has a collection of appointments, and has a method that returns the first available slot after the current time of a given duration.
- 进入论坛 招聘求职 版
考题是我一个在美国的同学传给我的,共大家参考参考而已。下面还有一道,大家觉得是简单些还是难些?
Create a "Diary" class that has a collection of appointments, and has a method that returns the first available slot after the current time of a given duration.
- 进入论坛 招聘求职 版
neomac.lin 写道看看不同的思路,跟你自己的大同小异。抽象的角度不一样。
三人行,必有我师。谢谢。
我开始的思路部分地与你的接近,但后来改了。
本来也想用字符串表示城市,但考虑到大小写的问题,为避免map中的key出现歧义,就放弃了。
- 进入论坛 招聘求职 版
写了一个,简单测试没有问题,但总觉得如果城市和道路数量比较多的时候,运算时间会急剧增加。另外,对保存地图的数据结构也不满意,应该有更好的方式。
import java.io.*;
import java.util.*;
class Status {
static final int UNVISITED = 0;
static final int VISITING = 1;
static final int VISITED = 2;
}
class City {
private String name;
private int status = ...
- 进入论坛 招聘求职 版
liwei 写道www.dajuhe.com 是用gwt做的
这个想法很好,坚持就是胜利。
- 进入论坛 AJAX 版







评论排行榜