跳转到指定楼层
上一主题 下一主题
收起左侧

刚给fb送的人头

🔗
 楼主| 皮卡丘不想刷题 2018-10-12 03:03:01 | 只看该作者
全局:
KevinSAP 发表于 2018-10-11 12:10
请问fb bug free是必须面试代码一次写完没bug吗?需要自己写test case吗?是在ide自己compile还是口头带test  ...

口头呢 他们不run您别怕

评分

参与人数 1大米 +10 收起 理由
wzhbtbt + 10 给你点个赞!

查看全部评分

回复

使用道具 举报

🔗
franlisa 2018-10-13 11:07:45 | 只看该作者
全局:
java也有对应的将这个时间换成原题,不过还是强烈谴责这波操作;
```
public void time(String time) throws ParseException {
        String[] strs = time.split(" - ");
        SimpleDateFormat format = new SimpleDateFormat("hh:mm a");
        SimpleDateFormat date24Format = new SimpleDateFormat("HH:mm");
        String start = date24Format.format(format.parse(strs[0]));
        String end = date24Format.format(format.parse(strs[1]));
        int startT = Integer.parseInt(start.substring(0, 2) + start.substring(3));
        int endT = Integer.parseInt(end.substring(0, 2) + end.substring(3));

        System.out.println("[ "+startT + ","+ endT + " ]");
    }
```
跟他约定好时间格式 一定是 TT:TT xm - TT:TT ym 这样的。(x,y 可以是a跟b)
        test.time("10:00 am - 10:20 am");
        test.time("12:00 am - 12:00 pm");
        test.time("12:30 pm - 1:00 pm");
回复

使用道具 举报

🔗
franlisa 2018-10-13 11:15:02 | 只看该作者
全局:
franlisa 发表于 2018-10-13 11:07
java也有对应的将这个时间换成原题,不过还是强烈谴责这波操作;
```
public void time(String time) th ...

我好像回复错帖子了,尴尬,应该是这个。。。 http://www.1point3acres.com/bbs/ ... adio%26sortid%3D311
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册账号
隐私提醒:
  • ☑ 禁止发布广告,拉群,贴个人联系方式:找人请去🔗同学同事飞友,拉群请去🔗拉群结伴,广告请去🔗跳蚤市场,和 🔗租房广告|找室友
  • ☑ 论坛内容在发帖 30 分钟内可以编辑,过后则不能删帖。为防止被骚扰甚至人肉,不要公开留微信等联系方式,如有需求请以论坛私信方式发送。
  • ☑ 干货版块可免费使用 🔗超级匿名:面经(美国面经、中国面经、数科面经、PM面经),抖包袱(美国、中国)和录取汇报、定位选校版
  • ☑ 查阅全站 🔗各种匿名方法

本版积分规则

>
快速回复 返回顶部 返回列表